Linda A. Walsh
2014-Mar-26 21:21 UTC
Fwd: How would I make dir2 a copy of dir1 w/hardlinks for the files?
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
2014-Mar-26 21:33 UTC
Fwd: How would I make dir2 a copy of dir1 w/hardlinks for the files?
-----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-----
Seemingly Similar Threads
- How would I make dir2 a copy of dir1 w/hardlinks for the files?
- [Bug 13587] New: Add a --dry-run way to show destination for each item
- directories not correctly recognized rsync-3.0.4
- How to replace slashes with back slashes
- rsync-ing from two locations with same filenames (at different versions)