From owner-freebsd-questions Sun Mar 17 6:27: 5 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail1.toronto.istar.net (mail1.toronto.istar.net [209.89.75.17]) by hub.freebsd.org (Postfix) with ESMTP id A0A5737B41A for ; Sun, 17 Mar 2002 06:26:57 -0800 (PST) Received: from d226-39-102.home.cgocable.net ([24.226.39.102] helo=x1-6-00-50-ba-de-36-33.kico2.on.cogeco.ca) by mail1.toronto.istar.net with esmtp (Exim 2.02 #1) id 16mbdn-0003xY-00; Sun, 17 Mar 2002 09:28:07 -0500 Received: from localhost (genisis@localhost) by x1-6-00-50-ba-de-36-33.kico2.on.cogeco.ca (8.11.6/8.11.6) with ESMTP id g2HEXM172598; Sun, 17 Mar 2002 09:33:23 -0500 (EST) (envelope-from genisis@istar.ca) X-Authentication-Warning: x1-6-00-50-ba-de-36-33.kico2.on.cogeco.ca: genisis owned process doing -bs Date: Sun, 17 Mar 2002 09:33:22 -0500 (EST) From: Dru X-X-Sender: To: Tim Kellers Cc: Roman Neuhauser , "Kellers, Timothy" , "'questions@freebsd.org'" , "'kellers@njit.edu'" Subject: Re: desktop.eml and sample.eml In-Reply-To: <20020316221004.J49217-100000@serv1.wallnet.com> Message-ID: <20020317092424.N1643-100000@genisis> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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, 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