1832807 Members
2891 Online
110045 Solutions
New Discussion

Simple Tar question

 
Manuel_8
Advisor

Simple Tar question

Hello,
I have "tar" a directory whit -cvf file.tar file.orig options;
I'm not sure that I have buckupped also link.
Is there a specific option to do it?
Thanks for yours helps.

5 REPLIES 5
Robert-Jan Goossens
Honored Contributor

Re: Simple Tar question

Hi Manuel,

You can check your tar "ball"
with
# tar tvf file.tar
and look if you link is included.

Robert-Jan.
Marco Santerre
Honored Contributor

Re: Simple Tar question

to tar the symbolic links, use the -h option on your tar command
Cooperation is doing with a smile what you have to do anyhow.
MANOJ SRIVASTAVA
Honored Contributor

Re: Simple Tar question

I think you will have to use option "h" because tar doesnot follow symbolic links , do a man tar and you will know more .


Manoj Srivastava
Jean-Louis Phelix
Honored Contributor

Re: Simple Tar question

hi,

Not sure about your question, but if you want to backup the link itself (not the file it points to), tar cvf will do it. If you want to backup the linked file as if it was a regular file, then (and only in this case) use -h key as Marco said.

Regards.
It works for me (© Bill McNAMARA ...)
Robert-Jan Goossens
Honored Contributor

Re: Simple Tar question

Hi all,

Just looked at your answers, and yes -h or not -h that is the question (:>

Manuel with -h option tar will follow the link (original file) without -h tar will archieve the link itself.

Hope this helps.

Robert-Jan.