--link-dest doesn't work if target file exists (but needs updating)

Brian J. Murrell brian at interlinx.bc.ca
Fri Jan 20 15:56:24 MST 2012


On 12-01-20 05:42 PM, Kevin Korb wrote:
> Am I understanding right that your source and your link-dest are
> actually the same path?

Yes they are!

> If so what are you trying to do that wouldn't
> be accomplished with a simple 'cp -l'?

Not all of the files in source and dest are supposed to be the same.  I
only want to link the files that are.

> Also, when using --link-dest the target is treated differently.
> Normally the target is an empty directory but if files already exist
> the behavior you are seeing is what is supposed to happen.  Instead of
> deleting files and replacing them with links it assumes that they are
> already linked to whatever they are supposed to be linked to and
> updates them accordingly.

That's a pity.  Understandable perhaps for the case where there is more
than one link to the destination file, but if there is not (i.e. there
is only one link to the file, such as the example I provided) it should
feel free to unlink it and relink it to the -link-dest specified file.
Additionally, I would think an option to force that behavior even if
there is >1 link would be useful.

b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/rsync/attachments/20120120/10740368/attachment.pgp>


More information about the rsync mailing list