Fwd: How would I make dir2 a copy of dir1 w/hardlinks for the files?

Kevin Korb kmk at sanitarium.net
Wed Mar 26 15:33:13 MDT 2014


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

The rsync equivalent to cp -al would be:
rsync -a --link-dest=/path/to/dir1 /path/to/dir1/ /path/to/dir2/

Note that I switched to absolute paths since rsync considers
- --link-dest relative paths to be relative to the target so the
relative example would be: rsync -a --link-dest=../dir1 dir1/ dir2/
which I think is stupid.

On 03/26/2014 05:21 PM, Linda A. Walsh wrote:
> Kevin Korb wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> rsync not needed: cp -al dir1 dir2
>> 
> Right now, neither is 'cp' (as of V8.21 - V10 inclusive) -- 
> "apparently" (?) in response to this article:
> http://danwalsh.livejournal.com/64493.html.
> 
> Right now, 'cp' tries to 'hardlink' to symlinks, which AFAIR has
> never been an option -- any more than hardlinking to directories.
> 
> I was trying to see if rsync was a viable alternative until the
> bug is fixed, and had abilities cp used to (bug currently does
> not).
> 
> 
> 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	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.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlMzR5kACgkQVKC1jlbQAQfVggCfX8Puagj9LUzKBr93WhEZCCvo
CnoAoLjE7UUfjEZeXcICsDw3rUsPgSYR
=I9m9
-----END PGP SIGNATURE-----


More information about the rsync mailing list