Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 1998 16:07:26 -0400
From:      Chuck Swiger <cswiger@widomaker.com>
To:        "'Roman Katsnelson'" <romank@graphnet.com>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@FreeBSD.ORG>
Subject:   RE: tar problem
Message-ID:  <01BDB978.B036FE10@SERV_BDC>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01BDB978.B036FE10>