Operating System - HP-UX
1830498 Members
2256 Online
110006 Solutions
New Discussion

tar/gtar - symbolic links

 
SOLVED
Go to solution
Chern Jian Leaw
Regular Advisor

tar/gtar - symbolic links

When I performed a gtar on the filesystems with the option :
tar -xvfh filesys1.tar filesys

It produced the following error:
tar:Cannot open h:No such file or directory

The filesystem to be tar-ed is filesys and within filesys, there're sub-filesystems containing links to other filesystems.

I was wondering if tar could actually archive both the file and the links from a particular dir/file ?

Thanks
2 REPLIES 2
Pete Randall
Outstanding Contributor
Solution

Re: tar/gtar - symbolic links

Hi,

It's interpreting your h option as the name of the device file (f). Try tar -xvhf filesys1.tar filesys.

Hope this helps,
Pete

Pete
John Carr_2
Honored Contributor

Re: tar/gtar - symbolic links

Hi

as Pete pointed out the f option uses the next option as the name of an archive instead of the default /dev/rmt/0m


using the "h" option allows tar to follow symbolic linksas if they were normal files or directories. tar by default ignores these.

John.