On 18/06/13 15:02, Kevin Korb wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
rsync -vai --lin-dest=/path/to/source/ /path/to/source/ /path/to/target/
Note that if you try it with relative paths the link-dest will be
relative to the source not .
Thank you Kevin.
I'd forgotten that --link-dest needed a relative path. This works for me:
rsync -Haxv --stats --link-dest ../dir1 dir1/ dir2
The / on the end of the second dir1 is, of course, essential.
cheers
Chris
On 06/18/13 09:39, Chris Dennis wrote:
Hello rsync people
I thought I knew how to use rsync, but I can't work out how to use
it to do the equivalent of
cp -al dir1 dir2
where dir1 and dir2 are both local and on the same disk.
In other words I want to make dir2 a copy of dir1, with every file
hard-linked to its counterpart in dir1.
Why not just use cp? Because I want to be able to do it as a user
who has sudo permission to run rsync but not cp.
cheers
Chris
- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. ke...@futurequest.net (work)
Orlando, Florida k...@sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlHAaIgACgkQVKC1jlbQAQcKLQCfSaHopk/J2bhPCUFuwR3KSIMM
daQAnjpVXhgeRz0bvb2/ttKVNZHAmuq6
=5f7j
-----END PGP SIGNATURE-----
--
Chris Dennis cgden...@btinternet.com
Fordingbridge, Hampshire, UK
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html