On Mon, Jun 16, 2014 at 5:29 AM, Karl-Philipp Richter <krichter...@aol.de>
wrote:

> <code>
> X=`mktemp`
> echo "abc" > $X/1
> echo "abc1" > $X/2
> Y=`mktemp`
> echo "abc" > $Y/1
> echo "abc2" > $Y/2
> </code>

I'll assume you meant to use -d on your mktemp commands (as another
responder *almost* pointed out).


>   * `rsync --dry-run --info=COPY -r -c $X/ $Y/` # same as above with
> trailing slashes
>

This is almost the right command, you're just asking for the wrong info.
The trailing slashes are needed to properly tell rsync to just copy the
contents of the one dir to another without copying the directory by name
inside the transfer.  If you had also asked for --info=NAME you'll have
gotten the names of the transferred files.  The COPY info is for "files
copied locally on the receiving side", as in the case where you use
something like --copy-dest=DIR and rsync makes a copy of a local file
instead of transferring it from the sending side.

As for what the -n option does, it just tell rsync not to do any work.  Any
output generated is only what you tell it to output, so -n is usually
paired with -v (--verbose).

..wayne..
-- 
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