hard links (leafnode)

PleegWat pleegwat at telfort.nl
Sun Sep 23 09:55:22 UTC 2012


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

On 09/23/2012 09:52 AM, Thufir wrote:
> Just want to make sure before I do the backup. It should be fine?
> Just backup, and then I can put it back onto the spool at
> /var/news?

Sounds like it, but if you're concerned, why not just verify it
yourself? Using tar as an example:

$ mkdir test
$ echo 'some text' > test/a
$ ln test/a test/b
$ ls -l test
total 8
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 a
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 b
$ tar -cvzf test.tgz test
test/
test/a
test/b
$ rm -rf test
$ tar -xvzf test.tgz
test/
test/a
test/b
$ ls -l test
total 8
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 a
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 b


The '2' in the second column indicates the test file has 2 hardlinks
to it. Compare the following output after archiving and restoring
using 'zip', which does not support hardlinks:

$ ll test
total 8
- -rw-rw-r-- 1 pleegwat pleegwat 10 Sep 23 11:50 a
- -rw-rw-r-- 1 pleegwat pleegwat 10 Sep 23 11:50 b


PleegWat
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQXtyKAAoJEAM6sLJjDJaMIoYIAK7LdPOeVI6IrC68XBR6JPAG
Z9USL1q4NFQORtkjJ5gLuVObEcew+aVJ7SMJW3a71MGXwh7OBebzZPMXcj13/baD
UHBsB1CuBIt3EY41mwtbQcmro6G5NjpENfsYojimszfsmRN0ihzYpdXBEiwpdRS1
QUmpQ7eZX8LLJtmkB40KfldsS/pqqbYSocHCRHbH1n0Cr5k+8LTdu5alXEpMxSFG
yJ1DqY9ip0GKd83qg+tNoFht29SfmQz6pBbDiEMgDXs+TYQrOPxbz/nE2UtfzChX
SUgQ/F74QPyIEPGN3NdWTU8KUhLoKfQCo8igRdMNP/eSjONEj4Wy0nskPq2uAwA=
=S7h0
-----END PGP SIGNATURE-----




More information about the ubuntu-users mailing list