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: Shimpei Yamashita <shimpei@example.com>
- Date: Wed, 11 Apr 2001 22:14:23 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- In-Reply-To: <3AD44A28.A7797A45@example.com>; from darrenj@example.com on Wed, Apr 11, 2001 at 09:12:24PM +0900
- References: <20010411170258.F1F6.AKAMINE@example.com> <87puejg3z0.wl@example.com> <3AD44A28.A7797A45@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <Lb-lLC.A.uHH.HqF16@example.com>
- Resent-Sender: tlug-request@example.com
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
- Follow-Ups:
- Re: tar and directory information
- From: "A.Sajjad Zaidi" <sajjad@example.com>
- 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>
Home | Main Index | Thread Index
- Prev by Date: Re: tar and directory information
- Next by Date: RE: April 13th Nomikai!
- Prev by thread: Re: tar and directory information
- Next by thread: Re: tar and directory information
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links