Linda A. Walsh
2014-Mar-26 18:22 UTC
How would I make dir2 a copy of dir1 w/hardlinks for the files?
I have a dir "dir/" with 2 dirs in it "a/" and "b/". dir b/ has a file in it 'file' dir a has a relative symlink to that file: Ishtar:/tmp> ll dir total 0 drwxrwxr-x 2 20 Mar 26 10:51 a/ drwxrwxr-x 2 17 Mar 26 10:49 b/ Ishtar:/tmp> ll dir/{a,b} dir/a: total 0 lrwxrwxrwx 1 9 Mar 26 10:51 symfile -> ../b/file dir/b: total 0 -rw-rw-r-- 1 0 Mar 26 10:49 file --- What I want is to create a new dir, 'dir2/' with 'file' being hardlink'ed between the two (since it's identical). I am not seeing how one would do this in rsync? I keep ending up with 'file' being a separate copy in dir2... Can rsync do this?
Kevin Korb
2014-Mar-26 18:25 UTC
How would I make dir2 a copy of dir1 w/hardlinks for the files?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 rsync not needed: cp -al dir1 dir2 On 03/26/2014 02:22 PM, Linda A. Walsh wrote:> I have a dir "dir/" with 2 dirs in it "a/" and "b/". > > dir b/ has a file in it 'file' > > dir a has a relative symlink to that file: > > Ishtar:/tmp> ll dir total 0 drwxrwxr-x 2 20 Mar 26 10:51 a/ > drwxrwxr-x 2 17 Mar 26 10:49 b/ Ishtar:/tmp> ll dir/{a,b} dir/a: > total 0 lrwxrwxrwx 1 9 Mar 26 10:51 symfile -> ../b/file > > dir/b: total 0 -rw-rw-r-- 1 0 Mar 26 10:49 file --- > > What I want is to create a new dir, 'dir2/' with 'file' being > hardlink'ed between the two (since it's identical). I am not seeing > how one would do this in rsync? > > I keep ending up with 'file' being a separate copy in dir2... > > Can rsync do this? > >- -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ 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/ iEYEARECAAYFAlMzG3wACgkQVKC1jlbQAQcbHQCgx68hmWUJLSgcyyLNG2UwoIFp rJ4AoLcj/FJvYIlgZMFYcAnRy0T3Yp5s =4x6i -----END PGP SIGNATURE-----
Maybe Matching Threads
- smbd: PANIC (pid xxxxx): internal error -- ? causes?
- Fwd: How would I make dir2 a copy of dir1 w/hardlinks for the files?
- why is my "nmbd" confused about network interfaces?
- rsync 3.0.9 incompatible with self? (proto incompat on local->local)
- Resend of returned email: [3.6.6] Possible to allow password-free read/write access?