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: Sergey Poznyakoff
Subject: Re: [Bug-tar] Option -h of tar 1.26 is broken
Date: Wed, 16 Nov 2011 01:13:04 +0200

Juan PC <address@hidden> ha escrit:

> Option -h is not working in tar 1.26. When creating a tar archive, if
> the file a symlink points to (let us call it "the original file")
> appears after the symlink, then, the original file can not be
> individually extracted from the tar file. Here you have the proof
> (Linux distribution is Fedora 16):

In this case tar does exactly what it is supposed to do: follows 
the symbolic link.  Since the link points to another file already added
to the archive, it is then converted to hard link [1].

If it's not what you want, use --hard-dereference together with
-h:

 tar -cvzhf test.tgz --hard-dereference /etc/rc0.d/K15httpd 
/etc/rc.d/init.d/httpd

Regards,
Sergey

[1] 
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=37ddfb0b7eb41cc3f58bce686d389b1e965e9ccf




reply via email to

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