From owner-freebsd-questions Mon Jul 27 16:53:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA12544 for freebsd-questions-outgoing; Mon, 27 Jul 1998 16:53:52 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from lucy.bedford.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA12472 for ; Mon, 27 Jul 1998 16:53:29 -0700 (PDT) (envelope-from listread@lucy.bedford.net) Received: (from listread@localhost) by lucy.bedford.net (8.8.8/8.8.8) id TAA06719; Mon, 27 Jul 1998 19:52:45 -0400 (EDT) (envelope-from listread) Message-Id: <199807272352.TAA06719@lucy.bedford.net> Subject: Re: tar problem In-Reply-To: <01BDB978.B036FE10@SERV_BDC> from Chuck Swiger at "Jul 27, 98 04:07:26 pm" To: cswiger@widomaker.com (Chuck Swiger) Date: Mon, 27 Jul 1998 19:52:45 -0400 (EDT) Cc: romank@graphnet.com, freebsd-questions@FreeBSD.ORG X-no-archive: yes Reply-to: djv@bedford.net From: CyberPeasant X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chuck Swiger wrote: > Roman Katsnelson[SMTP:romank@graphnet.com] inquires: > > >I made a little mistake. When I download tarred files, I usually just > >save them to the root directory, and when I untar them, they _always_ > >created a top level directory and then files and subdirs in there. > > > >However, this time I untarred a file and it threw a whole bunch of stuff > >in my / directory which is now a big mess. I really don't want to > >manually go and delete all of them, is there any way to reverse what I > >did? > > > Well, I'm no Unix whiz but this has worked for me (any overrulling ideas from > the list welcome): > > In the directory that was clobbered with the files, run: > > #rm -rf `tar tf tarfile` > > ` <--- is the character next to the '1' , unshifted ~ on many keyboards. > > That should get a list of files in the tarfile, and remove them, along with directories, > without asking any questions. Ouch! That's really really asking for trouble. I'd lose the f switch and add the -i Typing a bunch of y's is preferable to wondering where /usr or /dev went. Of course I snipped where you recommend using tar -t...f xxxxx to see what's going to happen. if that viewing is ok, then maybe that method might be OK. Still, it looks frighteningly iffy to me to execute it when cwd is / Suppose I have a tar with a file named * [listread@castor listread]$ mkdir stuff [listread@castor listread]$ cd stuff [listread@castor stuff]$ touch * [listread@castor stuff]$ ls -l total 0 -rw-rw-r-- 1 listread listread 0 Jul 27 19:50 * [listread@castor stuff]$ Dave -- Sancho Panza: `Microsoft Windows NT Server is the most secure network operating system available.' Don Quixote: `You are mistaken, Sancho.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message