--compare-dest; I'm missing the boat

Matt McCutchen matt at mattmccutchen.net
Thu Jan 15 23:02:35 GMT 2009


On Thu, 2009-01-15 at 16:54 -0600, Harry Putnam wrote:
> I tried this test. (d1 has single files and 2 subdir with files)
> 
>    cp -a d1 d1a
> 
>    mkdir d2
> 
> rsync -avv --compare-dest="./d1a" d1/ d2/
> 
> d1a is carbon copy of d1 but still every last file in d1 is copied to
> d2. 

Two paragraphs later in the man page:

"If DIR is a relative path, it is relative to the destination
directory."

So you should use:

rsync -avv --compare-dest="../d1a" d1/ d2/

-- 
Matt



More information about the rsync mailing list