On 11/15/11 11:27, Juan PC wrote:
> tar xvzf test.tgz etc/rc.d/init.d/httpd
> etc/rc.d/init.d/httpd
> tar: etc/rc.d/init.d/httpd: Cannot hard link to `etc/rc0.d/K15httpd': No such 
> file or directory

At that point, test.tgz looks like this:

-rwxr-xr-x root/root      3371 2011-09-13 06:47 etc/rc0.d/K15httpd
hrwxr-xr-x root/root         0 2011-09-13 06:47 etc/rc.d/init.d/httpd link to 
etc/rc0.d/K15httpd

There are no symbolic links here, just hard links.  And yes,
tar cannot extract a hard link to a file that does not
exist -- that's a property that is inherent to hard links.
I'm afraid.

It's possible to imagine a tar option or variant
that would cause it to extract the original file under the
hard-linked name, but that'd be quite a performance hog, since
it'd have to remember all the files in the input, and their
contents.

Reply via email to