Date: Sun, 17 Mar 2002 09:33:22 -0500 (EST) From: Dru <genisis@istar.ca> To: Tim Kellers <timothyk@serv1.wallnet.com> Cc: Roman Neuhauser <neuhauser@mobil.cz>, "Kellers, Timothy" <kellers@ADM.NJIT.EDU>, "'questions@freebsd.org'" <questions@FreeBSD.ORG>, "'kellers@njit.edu'" <kellers@njit.edu> Subject: Re: desktop.eml and sample.eml Message-ID: <20020317092424.N1643-100000@genisis> In-Reply-To: <20020316221004.J49217-100000@serv1.wallnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 16 Mar 2002, Tim Kellers wrote:
>
> Using find, is this command safe?
>
> find / -name "sample.eml" -delete
>
> I've read (and re-read) the man page for find and I'm still a bit skittish
> about the -delete function. And while I have used find often before, I've
> never used the -delete argument. When I tried it earlier this evening on
> my home computer, I wiped out my home directory. (I figured out my
> boneheaded syntax after that one).
>
> I can't afford to wipe out the school's server, though, so any suggestions
> (or different approaches) to deleting these miserable virus droppings.
>
> Thanks,
<snip>
Hi Tim,
If you're concerned about inadvertantly nuking other files, there's a
couple of ways you can verify what will be deleted before doing the
delete. You could become the superuser and cd into / and try this:
su
cd /
find . -name "*.eml" -print > somefile
then skim over the resulting somefile. If it looks good, use this command
to remove the files:
find . -name "*.eml" -delete
An alternative is to use the "ok" switch which will prompt you for every file
it finds, asking your permission before deleting it. A bit slower, but you'll
know which files will get deleted:
find . -name "*.eml" -ok rm {} \;
HTH,
Dru
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?20020317092424.N1643-100000>
