bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Option -h of tar 1.26 is broken


From: Paul Eggert
Subject: Re: [Bug-tar] Option -h of tar 1.26 is broken
Date: Tue, 15 Nov 2011 22:31:31 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

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

[Prev in Thread] Current Thread [Next in Thread]