symlink bug still not fixed

Peter Sturdza psturdza at
Fri Apr 23 03:54:57 GMT 2004

--- Wayne Davison <wayned at> wrote:
> ...
> The way rsync currently works, it doesn't consider a
> file and a symlink
> to be the same thing, so the -u option will not
> prevent a file from
> being replaced by a symlink.
> ...

Hmm.  But the symlink is older.  I would expect the
symlink to overwrite an older file, but not a newer
one, which it does.  Well, maybe it is philosophical,
but I see this as a problem.  

Firstly, and most obviously, the unexpected loss of a
symlink is not as tragic as the loss of a file with
potentially lots of data in it.  In fact, the symlink
will replace a directory too, so you could lose an
entire directory tree!  At least a note to this effect
should show up in a README or man page, no?

Secondly, symlinks are often used to avoid duplicate
identical files.  It isn't unreasonable to then assume
that if one of them needs a slight modification, one
would replace the symlink with a regular file and make
that modification.  Now, if you use rsync to
synchronize your desktop and laptop, say, then the
modification is destroyed.

I therefore believe that this behavior is
counter-intuitive and strongly suggest that it be
changed so that a symlink doesn't replace anything
else with a newer date stamp when the -u option is
used.  After all, -u stands for update!


Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

More information about the rsync mailing list