--diff option for rsync (Re: rsync feature request)

Martin Pool mbp at samba.org
Fri Mar 15 11:49:35 EST 2002


On 14 Mar 2002, david.e.sewell at jpmorgan.com wrote:
> I'm sure you get a million and one requests for changes to rsync. I thought
> I would put my bid in and sugest that a feature to perform a unix style
> diff of files that are found to be different would be useful for
> administrators that use rsync to maintain synchronised of application
> distributions. We us it to maintain application distributions and generate
> reports of differences between software trees compared to a reference host.
> When we detect differences between config files and scripts it would be
> fantastic if rsync could automatically generate the diff report.

I think we could do this fairly easily by just diffing the temporary
file on the destination and then discarding it, rather than moving it
into place.  It's probably simplest to call out to a user-specified
command:

  rsync --diff 'diff -wu' ~/work/rsync/head/src wistful:work/rsync/head/src

We need to make sure diff output is piped back across the network and
not mixed up with anything else.

For security reasons I guess we can't allow you to do this when
uploading to a server.

Thanks for the idea,

-- 
Martin 




More information about the rsync mailing list