Why does rsync -an show files that are the same?

Wayne Davison wayned at samba.org
Sun Jun 4 07:35:24 GMT 2006


On Sat, Jun 03, 2006 at 09:05:09PM -0500, Larry Alkoff wrote:
> In testing this with two subdirectories with man files and sub-sub 
> directories, rsync _seems_ to be showing all files instead of only the 
> few that have recently changed.

I'd imagine that the reason for this is that rsync is going to copy the
files to a different directory than you're expecting.  For instance, if
you run your script like this:

    script dir/ /dest
    
the $1* turns into "dir/*", which copies the files from inside "dir"
directly into "/dest" (use the --relative option if you want them to go
into /dest/dir).

I'd suggest using -i (--itemize) along with -n (--dry-run) to see why
rsync thinks that each file needs to be transferred.  If you see a
string of plus signs, that means the file doesn't exist yet in the
destination.  Otherwise, you'll see which attributes are different
between the source and the destination (i.e. the timestamp or size
must differ for rsync to transfer the file).

..wayne..


More information about the rsync mailing list