gnu --target-dir, how to fake with rsync?
throwit1 at gmail.com
Mon Oct 5 10:47:54 MDT 2009
Is this in rsync and I just can't find it, or if not, is there a way
to fake this OR, third possibility, is anyone working to add it?
For those who've never used this option - for the GNU cp & mv type
commands they have the
option. It lets you put the destination directory as the first
argument to cp and mv instead of the last argument.
They added the option to get cp & mv working well with xargs for
stuff like this:
find ./ -type file -mindepth 3 -print0 | xargs -r0 cp
then xargs puts all of the files found by find after the --
Before I learned about this argument I used to do stuff like the "-i"
and "-n" options
find ./ -type file -mindepth 3 -print0 | xargs -r0 -iTARGET -n1 cp
Which limits xargs to doing one file per invocation.
More information about the rsync