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

Larry Alkoff labradley at mindspring.com
Thu Jun 8 13:25:34 GMT 2006


Matt McCutchen wrote:
> On Sun, 2006-06-04 at 14:06 -0500, Larry Alkoff wrote:
>> I've tried both --itemize-changes and --relative and, in both cases, 
>> rsync does not seem to be decending.  My command is now:
>> script ~/inv/* ~/inv.orig/
>> where script is:
>>
>> rsync -uaHvn --relative --itemize-changes --modify-window=4000 
>>           $1  $2
> 
> That call to script is definitely wrong.  If ~/inv contains two files
> foo and bar, it will expand to:
> 	script ~/inv/foo ~/inv/bar ~/inv.orig/
> 
> $1 is ~/inv/foo and $2 is ~/inv/bar, so the rsync command expands to:
> 	rsync <options> ~/inv/foo ~/inv/bar
> 
> That can't possibly be what you want.  Just do this:
> 	script ~/inv/ ~/inv.orig/
> 
> It will copy files in ~/inv/ to the same names in ~/inv.orig/, which I
> believe is what you want.  This command will also make it possible for
> rsync to delete extraneous top-level files from ~/inv.orig/ if you pass
> a --delete* option.  You might find it helpful to put "set -x" at the
> beginning of your script to make bash print out each command before
> executing it; that way you can see if the call being made to rsync is
> what you intend.
> 
> If rsync still doesn't seem to be descending, try using double verbose
> or double itemize-changes to get a list of all the files rsync considers
> instead of just the ones transferred; this might shed light on the
> problem.  Once you know rsync is considering all the files, change back
> to single itemize-changes to see why it believes each file needs to be
> updated.
> 
> Matt
> 
> 


Thanks for your informative reply Matt.  It's a little hectic here with 
  4 contractors scheduled to appear in the next two days.   I'll tryout 
the things you mention above this weekend and get back.

Larry

-- 
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Slackware Linux


More information about the rsync mailing list