Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tar and directory information
- To: tlug@example.com
- Subject: Re: tar and directory information
- From: "A.Sajjad Zaidi" <sajjad@example.com>
- Date: Fri, 13 Apr 2001 10:20:58 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=iso-2022-jp
- Organization: Vanguard K.K.
- References: <20010411170258.F1F6.AKAMINE@example.com> <87puejg3z0.wl@example.com> <3AD44A28.A7797A45@example.com> <20010411221423.A4446@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <v7-5a.A.gNB.9Rl16@example.com>
- Resent-Sender: tlug-request@example.com
- Sender: sajjad
Also better be carefull with symlinks when untarring. I had /usr/local as a symlink to another mounted drive and untarring a tarfile containing 'usr/local/bin/FILENAME' in '/' overwrote the link. This left me with a very small and useless /usr/local until I realised the mistake and moved things to the right places. Shimpei Yamashita wrote: > On Wed, Apr 11, 2001 at 09:12:24PM +0900, Darren Cook wrote: > > > akamine> tar -zcvf data.tgz /home/work/data > > > ... > > > akamine> creates a directory /home/work/data in the current directory and puts > > > akamine> the files in it. I want this not to happen (just to put the files and > > > akamine> directories in the current directory). How can I do this? > > > > > > use -C or --directory option > > > > Or: > > cd /home/work/data > > tar -zcvf data.tgz * > > Well, you just missed all the files in that directories that start with a dot. > To prevent that, you need to use . instead of *. You're also writing the > archive into the very directory that you're backing up, which may not be a > good idea. (You'd better hope, at any rate, that /home/work/data doesn't > contain any file named data.tgz, because you just blew it away!) To prevent > that, you need to use the GNU tar -C flag, or the shell redirection someone > posted earlier. > > Shimpei. > > -- > Shimpei Yamashita http://www.shimpei.org/ > "Unix is a power tool. Power tools kill. Be careful." > -- a Computer Science professor at my college > > ----------------------------------------------------------------------- > 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
- References:
- tar and directory information
- From: Hector Akamine <akamine@example.com>
- Re: tar and directory information
- From: =?ISO-2022-JP?B?GyRCMG84KxsoQiAbJEI4JjBsGyhC?=(ITSUMI ken'ichi)<amt@example.com>
- Re: tar and directory information
- From: Darren Cook <darrenj@example.com>
- Re: tar and directory information
- From: Shimpei Yamashita <shimpei@example.com>
Home | Main Index | Thread Index
- Prev by Date: MS Linux
- Next by Date: Re: XIM, kinput2 & Tk
- Prev by thread: Re: tar and directory information
- Next by thread: MSLINUX
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links