[CentOS] tar cvhf with link restore??

mcclnx mcc mcclnx at yahoo.com.tw
Wed Jun 23 21:05:03 UTC 2010


I understand what you said.  In theory "h" should replace link to physical file.  But it really happen.

--- 10/6/23 (三),John R. Dennison <jrd at gerdesas.com> 寫道:

> 寄件者: John R. Dennison <jrd at gerdesas.com>
> 主旨: Re: [CentOS] tar cvhf with link restore??
> 收件者: "CentOS mailing list" <centos at centos.org>
> 日期: 2010年6月23日,三,下午4:44
> 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
> 
> -----內含下列夾帶檔案-----
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 


      



More information about the CentOS mailing list