Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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.)

share|improve this answer

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.


share|improve this answer

You must log in to answer this question.

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