Mailing List Archive

Support open source code!

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

Re: tar and directory information

On Wed, Apr 11, 2001 at 05:30:06PM +0900, Christopher SEKIYA wrote:
> On Wed, Apr 11, 2001 at 05:03:45PM +0900, Hector Akamine wrote:
> > tar -zcvf data.tgz /home/work/data
> "Doctor, it hurts when I do this!"
> "Well, then, don't do that."
> (cd /home/work/data; tar czvf /data.tgz .)

If you are stuck needing something from the old archive you might
just check the archive with tar tzvf data.tgz to see if you preserved
the root / (at the beginning) (default doesn't preserve it). If not
then you can for example untar somewhere else... example...

mkdir -p /tmp/home/work/data
(cd /tmp ; tar xzvf data.tgz)

and all your data should be in /tmp/home/work/data.

Better not to save your archives that way though, if you don't want to
restore that way, like Chris said.

Thomas O'Dowd                   Noop-de-Noop!        

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links