Matt McCutchen-7 wrote:
> 
> On Wed, 2009-10-07 at 04:40 -0700, Martin Scharrer wrote:
>> I agree with both above points. However, I would also vote for adding
>> such
>> an option to rsync.
>> This should not be to difficult and would come in handy.
> 
> I'm not convinced of the need for a --target-dir option.  Do you have an
> example in which it would be significantly cleaner than --files-from?
> 
No, I actually do not have an example ready.
However, other tools like 'tar' have similar options (-C, --directory), so
'rsync' should support it as well.


Matt McCutchen-7 wrote:
> 
>> About the mentioned use of the option --files-from:
>> Sanjeev's earlier example:
>> 
>>   find ./ -type file -mindepth 3 -print0 | xargs -r0 cp
>> --target-dir=/home/sam/stuff/otherstuff/morestuff -
>> 
>> can be adapted to rsync like this:
>> 
>>   rsync -0 --files-from=<(find ./ -mindepth 3 -type f -print0)
>> /home/sam/stuff/otherstuff/morestuff
>> 
>> if you are using the BASH shell. Otherwise you have to write the output
>> of
>> 'find' into a temp file and use this for --files-from.
> 
> No, you can use stdin, as the man page description of --files-from
> mentions:
> 
> find ./ -mindepth 3 -type f -print0 \
>       | rsync -0 --files-from=- /home/sam/stuff/otherstuff/morestuff
> 
> 
Thanks for pointing this out.

-- 
View this message in context: 
http://www.nabble.com/gnu---target-dir%2C-how-to-fake-with-rsync--tp25754312p25858300.html
Sent from the Samba - rsync mailing list archive at Nabble.com.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to