From owner-freebsd-questions Mon Jul 27 13:08:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA27473 for freebsd-questions-outgoing; Mon, 27 Jul 1998 13:08:49 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mailhost.infi.net (mailhost.infi.net [208.131.167.6]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA27403 for ; Mon, 27 Jul 1998 13:08:31 -0700 (PDT) (envelope-from cswiger@widomaker.com) Received: from SERV_BDC (pm7-189.orf.infi.net [209.97.9.189]) by mailhost.infi.net (8.8.8/8.8.8) with SMTP id QAA08564; Mon, 27 Jul 1998 16:07:50 -0400 (EDT) Received: by SERV_BDC with Microsoft Mail id <01BDB978.B036FE10@SERV_BDC>; Mon, 27 Jul 1998 16:07:43 -0400 Message-ID: <01BDB978.B036FE10@SERV_BDC> From: Chuck Swiger To: "'Roman Katsnelson'" Cc: "'freebsd-questions@freebsd.org'" Subject: RE: tar problem Date: Mon, 27 Jul 1998 16:07:26 -0400 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 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. I'v gotten in the habit of looking at what's *in* tar files before extracting, and using the 'z' option for .tar.gz files as well. Chuck FreeBSD-2.2.6 cswiger@widomaker.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message