MrC <[EMAIL PROTECTED]> ha escrit:

> However, upon extraction, symlinks a and b are not created correctly, and
> become dead links:

When you run `tar vxf /tmp/test.tar' you get the following:

test/
test/a
test/b
test/somedir/
test/somedir/a
../tar: Removing leading `../' from hard link targets
--------^^^^^^^^^^^^^^^^
     
If you wish to preserve relative paths to upper directories, use
-P (--absolute-names) command line option:

$ tar vvxfP /tmp/test.tar
drwxr-xr-x gray/staff        0 2007-06-01 00:24 test/
-rw-r--r-- gray/staff        0 2007-06-01 00:24 test/a
-rw-r--r-- gray/staff        0 2007-06-01 00:24 test/b
drwxr-xr-x gray/staff        0 2007-06-01 00:24 test/somedir/
lrwxrwxrwx gray/staff        0 2007-06-01 00:24 test/somedir/a -> ../a
lrwxrwxrwx gray/staff        0 2007-06-01 00:24 test/somedir/b -> ../b

Regards,
Sergey


Reply via email to