Copy only the differences in other structure

Paul Johnson pauljohn32 at gmail.com
Tue Feb 19 06:16:24 GMT 2008


On Feb 18, 2008 3:38 PM, Matt McCutchen <matt at mattmccutchen.net> wrote:
> On Mon, 2008-02-18 at 16:17 -0300, Edilson Azevedo wrote:
> > Directory 'foo' contain:
> > file1
> > file2
> > file3
> >
> > Directory 'foo2' contain:
> > file1
> > file2
> > file3
> > file4
> >
> >  After apply the rsync, it's create this structure:
> >
> > Directory 'foo_diff' with the file:
> > file4
>
> rsync -r --compare-dest=../foo/ foo2/ foo_diff/
>
> Matt

Just in case people don't misunderstand the use of the word diff here,
I don't think that will copy only the differences. It will copy the
changed files.  If that's what the original poster wanted, OK.

If you want just the changed bits of files, and not the whole files, I
think you should look at the rdiff-backup program, which does keep the
differences between editions in separate files.

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


More information about the rsync mailing list