Dry-run option in rsync 2.5.1 on Solaris 2.6

Dave Dykstra dwd at bell-labs.com
Fri Jan 11 01:37:07 EST 2002

On Thu, Jan 10, 2002 at 04:32:24PM +1100, Andrew Mak wrote:
> Hello All,
> I am using the rsync-2.5.1 on Solaris (Sparc) 2.6. I encountered the 
> following while trying to get a directory on two machine in sync.
> 1) copy the files /var/tmp/test-rsync/* from box1 to box2:/var/tmp/test-rsync/
> 2) touch a file AAAA in box1:/var/tmp/test-rsync/
> 3) in box1, type in the following
> /usr/local/bin/rsync -nculaR --stats 
> --partial  /var/tmp/test-rsync/  box2:/var/tmp/test-rsync/
> I am expecting rsync to report the file AAAA will be transfered. Instead, 
> rsync reports ALL the files in the directory /var/tmp/test-rsync will be 
> transfered.
>  From the man page of rsync, -c is to perform a checksum on all files in 
> the sender and receiver. If the file exist on the receiver, the checksum 
> and the size are the same, the file will be skipped.
> In this case, all but the file AAAA meets the condition, has anyone get any 
> idea on why is rsync still reports all the files?

I think the -R is the problem.

> Is there anyway to get 
> rsync to report only on the file it is going to transfer instead of 
> outputting the whole file list?

Yes, that's what it normally does.

> Many thanks in advance.

By the way, -c is almost always unnecessary extra overhead.  Since you're
copying the timestamps (implied by -a), you could take the default behavior
and have it quickly skip any file who's timestamp and size matches.

Also, -l is redundant since it is also implied by -a.

- Dave Dykstra

More information about the rsync mailing list