[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to restore files without deleting existing

On Sun, Oct 03, 2004 at 07:33:04PM -0700, Jeff Chimene wrote:
> --- Rajesh Menon <prm225@cs.nyu.edu> wrote:
> > As far as I know, if you operate on the symlink, you
> > are operating on 
> > the files/dir that it points to. Unlike hard links,
> > which are actual 
> > copies of the link pointed to.
> > And if I recall right, tar's behaviour, by default,
> > is to over-write the 
> > destination.
> > 
> > tar -xzf archive.tar.gz => it's going to create
> > (overwrite) a folder 'source' and dump the output in
> > there.
> Thank you for the reply! I think that I clobbered the
> symlink - i.e. the original files are in the original
> directory. The symlink got replaced by the actual
> directory.
> Is there a way for tar to follow the symlink, or am I
> supposed to be writing into the linked directory?
> Cheers,
> Jeff Chimene

In my test, I used -h option only for creating .tgz file
My untar did -not- have -h option and yet the files that
were in the .tgz file were placed by following the symlink.
I appears that you only need -h when you are creating.
So, this is not likely explanation of what happened to you.

But, again, maybe Red Hat tar behaves differently.

Paul E Condon           

Reply to: