[CentOS] tar cvhf with link restore??
John R. Dennison
jrd at gerdesas.com
Wed Jun 23 20:44:38 UTC 2010
On Thu, Jun 24, 2010 at 04:37:25AM +0800, mcclnx mcc wrote:
> I am doing "tar" test due to some software require "tar cvhf". When I
> using "tar cvhf and tar xvhf ", files have symbolic link replace by
> physical files.
>
> wield things is my friend using same command 'tar cvhf and tar xvhf".
> after restore link still there.
I find it unlikely he's using the same command line; see below.
> does there has way when I using "tar cvhf" and "tar xvhf" I can get
> link back not physical files?
-h / --dereference does not archive / follow the link but
rather the file that the link points to; it dereferences it
during archive creation.
Simple answer: do not use -h / --dereference and you will have
the behavior you wish.
As always, "man tar" for more information.
John
--
What happened should never, ever have happened. The families of those who
died should not have had to live with the pain and hurt of that day, and a
lifetime of loss.
-- Prime Minister David Cameron of Britain, apologizing for the Bloody Sunday
killings of 14 unarmed demonstrators by British soldiers in Londonderry,
Northern Ireland, in 1972, New York Times, 16 June 2010
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20100623/d2b1abf0/attachment.sig>
More information about the CentOS
mailing list