I got a tarball (let's say
t.tar.gz) that contains the following files
./b/b.txt is a hard link to
I want to unpack the tarball on a network file system (AFS) that only supports hard links in the same directory (see here).
Therefore, just unpacking it via
tar -xzf t.tar.gz raises an error that the hard link
./b/b.txt cannot be created.
So far, my solution to the problem was to unpack
./t.tar.gz on a file system that supports ordinary hard links. Then pack it again with the option
--hard-dereference as the GNU tar manual proposes. And lastly, unpack that new tarball into the AFS.
As this is unsatisfactory for me, I'm asking if there is an easier way to get the content of the archive unpacked directly to it's final destination? Such as an equivalent option to
--hard-dereference for unpacking instead of archiving?