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

Kevin Korb kmk at sanitarium.net
Fri Jan 20 16:01:48 MST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Someone has requested it:
https://bugzilla.samba.org/show_bug.cgi?id=7870

But is seems like an rm -rf and a cp -al would do the same thing.


On 01/20/12 17:56, Brian J. Murrell wrote:
> 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.
> 
> 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAk8Z8lwACgkQVKC1jlbQAQdJXACgnK4V8dlrDbleh0mjov/dZ3kK
YawAoOr/+7Ye8t7C0rFZrcPMoADv7X+S
=bMgr
-----END PGP SIGNATURE-----


More information about the rsync mailing list