Mailing List Archive

Support open source code!


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

Re: tar and directory information



Not all tars are created equal, so "Whose tar?" is important.
Gnu tar, the man page implies, does not do behave that way.
The -P switch, AKA --absolute-paths, is used if you don't
want to strip the leading / from paths. 

Take a look at man tar on your system and see if it says 
something different.

Jonathan

Hector Akamine (akamine@example.com) wrote:

> Suppose I use tar to archive files in a directory /home/work/data:
> 
> tar -zcvf data.tgz /home/work/data
> 
> the reference to the directory /home/work/data is preserved, meaning
> that when I use tar -zxvf to restore the files in another directory, tar
> creates a directory /home/work/data in the current directory and puts
> the files in it. I want this not to happen (just to put the files and
> directories in the current directory). How can I do this?
> 
> Thanks in advance
> 
> -----------------------------------------------------------------------
> Next Nomikai Meeting:    Fri, April 13 19:30- Tengu Tokyo Eki Mae
> Next Technical Meeting:  Sat, May 12 13:30- 
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan
> 


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links