--compare-dest and empty directories

Matt McCutchen matt at mattmccutchen.net
Fri Oct 2 04:06:10 MDT 2009


On Fri, 2009-10-02 at 03:21 -0500, Albert Chin wrote:
> With rsync-3.0.6 on a Solaris 10/x86 system:
>   $ mkdir /opt/s/c
>   $ cd /opt/s/c
>   $ gtar zxf rsync-3.0.6.tar.gz
>   $ mkdir /opt/s/o
>   $ rsync -aHv rsync-3.0.6 /opt/s/o
>   $ mkdir /opt/s/o2
>   $ cd /opt/s/o/rsync-3.0.6
>   $ echo foo >configure
>   $ rsync -aHv --compare-dest=/opt/s/c /opt/s/o/rsync-3.0.6 /opt/s/o2
>   $ cd /opt/s/o2
>   $ find .
>   ./rsync-3.0.6
>   ./rsync-3.0.6/doc
>   ./rsync-3.0.6/lib
>   ./rsync-3.0.6/packaging
>   ./rsync-3.0.6/packaging/bin
>   ./rsync-3.0.6/packaging/lsb
>   ./rsync-3.0.6/packaging/solaris
>   ./rsync-3.0.6/popt
>   ./rsync-3.0.6/support
>   ./rsync-3.0.6/testhelp
>   ./rsync-3.0.6/testsuite
>   ./rsync-3.0.6/zlib
>   ./rsync-3.0.6/configure
> 
> Is there a way, with --compare-dest, to perform the transfer without
> creating empty directories? What I want is:
>   $ find .
>   ./rsync-3.0.6
>   ./rsync-3.0.6/configure

No. See:

http://lists.samba.org/archive/rsync/2009-January/022488.html
http://lists.samba.org/archive/rsync/2005-October/013776.html

-- 
Matt



More information about the rsync mailing list