Juan PC <[email protected]> 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
