5

I see that tar respects hard links

$ ln clonezilla.iso test.iso

$ tar cfvvJ archive.tar.xz *.iso

-rw-r--r-- Steven 111149056 2012-03-25 07:34 clonezilla.iso
hrw-r--r-- Steven         0 2012-03-25 07:34 test.iso link to clonezilla.iso

7-Zip does not do this

$ 7z a -mx=9 archive.7z *.iso

$ ls -l

-rw-r--r-- 1 Steven 212827496 Apr 17 07:40 archive.7z
-rw-r--r-- 1 Steven 105073772 Apr 17 07:38 archive.tar.xz

Is there a way to make 7-Zip respect hard links?

gnu.org/software/tar/manual/html_node/hard-links

2 Answers 2

5

Since 7-zip v9.33 alpha, it is possible to keep hardlinks and symbolic links in the .tar and .wim formats. Those can then be compressed again with 7-zip.

Therefore: It is possible now, but requires an extra step.

Source: http://www.7-zip.org/history.txt

1
  • 1
    This is irrelevant to 7zip or the format. Basically no.
    – EkriirkE
    Commented Mar 16, 2020 at 18:34
4

The documentation in the 7-Zip source code doesn't mention hardlinks, nor does the 7z manpage, so it seems that it does not. (It does however support symlinks.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .