Re: How to restore files without deleting existing
--- Paul E Condon <firstname.lastname@example.org> wrote:
> On Sun, Oct 03, 2004 at 07:33:04PM -0700, Jeff
> Chimene wrote:
> > --- Rajesh Menon <email@example.com> wrote:
> > > As far as I know, if you operate on the symlink,
> > > are operating on
> > > the files/dir that it points to. Unlike hard
> > > which are actual
> > > copies of the link pointed to.
> > > And if I recall right, tar's behaviour, by
> > > 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
> > symlink - i.e. the original files are in the
> > 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
> My untar did -not- have -h option and yet the files
> were in the .tgz file were placed by following the
> I appears that you only need -h when you are
> So, this is not likely explanation of what happened
> to you.
> But, again, maybe Red Hat tar behaves differently.
bash-2.05b$ tar --version
tar (GNU tar) 1.13.25
Copyright (C) 2001 Free Software Foundation, Inc.
It's got something to do with following symlinks in a
secure way. I found a thread that seemed to indicate
that this behavior is more secure than previous
symlink handling. I didn't follow the thread closely,
but I think that's the gist of this class of behavior.
Fortunately, I have the original files :)
So, I will modify my restore process to write to the
actual directory, rather than the symlink. That should
yield the desired behavior.
> Paul E Condon
> To UNSUBSCRIBE, email to
> with a subject of "unsubscribe". Trouble? Contact
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around