Re: How to restore files without deleting existing
--- Rajesh Menon <firstname.lastname@example.org> 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
> tar -xzf archive.tar.gz => it's going to create
> (overwrite) a folder 'source' and dump the output in
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
Is there a way for tar to follow the symlink, or am I
supposed to be writing into the linked directory?
> Jeff Chimene wrote:
> >I'm trying to resolve a tar restore issue. Using
> >newest gnu tar.
> >While using tar to deploy software, today I wiped
> >clean my destination directory. This was somewhat
> of a
> >surprise. The only files left in the destination
> >those present in the source archive.
> >The destination directory is a symlink - could this
> >cause the existing files to be silently erased?
> >I hadn't seen this behavior under the orginal
> >host system. At that time, I went from Debian Linux
> >Solaris (unknown vintage). The new sequence is
> >Linux to Red Hat Linux.
> >In both environments, I create the archive as tar
> >archive.tar.gz source/
> >Under Solaris I restored using a command like gzip
> >archive.tar.gz | tar df -
> >In the new environment I thought I could just tar
> >archive.tar.gz Apparently, this isn't the case...
> >Thanks for your help,
> >Jeff Chimene
> >Do you Yahoo!?
> >Declare Yourself - Register online to vote today!
Do you Yahoo!?
Declare Yourself - Register online to vote today!