--- Rajesh Menon <[EMAIL PROTECTED]> 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 > > Jeff Chimene wrote: > > >Hi, > > > >I'm trying to resolve a tar restore issue. Using > the > >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 > were > >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 > Solaris > >host system. At that time, I went from Debian Linux > to > >Solaris (unknown vintage). The new sequence is > Debian > >Linux to Red Hat Linux. > > > >In both environments, I create the archive as tar > -czf > >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 > -xzf > >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! > >http://vote.yahoo.com > > > > > > > > > _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]