Keeping individual dirlinks

Wayne Davison wayned at samba.org
Sun Nov 4 21:34:07 GMT 2007


On Sun, Nov 04, 2007 at 03:57:11PM -0500, Matt McCutchen wrote:
> If rsync refrained from trimming a trailing /. off of source arguments
> (at least as an option), one could keep a dirlink by passing it as an
> additional source argument with a /. and excluding the non-/. version so
> that rsync does not see the symlink to convert it to a directory:

That already works just by specifying a relative source path with a
trailing slash.  Since rsync always sends implied dirs as dirs now, any
symlink that is discovered during the directory scan is discarded as a
duplicate:

mkdir src realdir
touch src/file1 realdir/file2
ln -s ../realdir src/sym
rsync -avRii src/./ src/./sym/ dest/

..wayne..


More information about the rsync mailing list