From owner-freebsd-questions Thu Dec 6 14:40:36 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailgw3a.lmco.com (mailgw3a.lmco.com [192.35.35.24]) by hub.freebsd.org (Postfix) with ESMTP id DAAE337B405 for ; Thu, 6 Dec 2001 14:40:33 -0800 (PST) Received: from emss01g01.ems.lmco.com ([129.197.181.54]) by mailgw3a.lmco.com (8.8.8/8.8.8) with ESMTP id RAA11998; Thu, 6 Dec 2001 17:40:32 -0500 (EST) Received: from CONVERSION-DAEMON by lmco.com (PMDF V5.2-33 #38886) id <0GNY00B011NJLM@lmco.com>; Thu, 6 Dec 2001 14:40:31 -0800 (PST) Received: from cui1.lmms.lmco.com ([129.197.1.64]) by lmco.com (PMDF V5.2-33 #38886) with ESMTP id <0GNY003661NEGH@lmco.com>; Thu, 06 Dec 2001 14:40:26 -0800 (PST) Received: from lmco.com (CONNECTICUT1.lmms.lmco.com [129.197.23.84]) by cui1.lmms.lmco.com (8.11.0/8.9.2) with ESMTP id fB6MeP621105; Thu, 06 Dec 2001 14:40:26 -0800 (PST) Date: Thu, 06 Dec 2001 14:39:52 -0800 From: rick norman Subject: Re: How to Use Find To Remove Files? To: Drew Tomlinson Cc: questions@freebsd.org Message-id: <3C0FF3B8.116E6FBE@lmco.com> MIME-version: 1.0 X-Mailer: Mozilla 4.77 [en] (WinNT; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en References: <000f01c17ea3$7bc9db40$962a6ba5@lc.ca.gov> 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 I would use something like : find . -name "*.core" -exec rm {} \; Rick Drew Tomlinson wrote: > I'm trying to learn to use the tools as intended. :) I have a > directory tree of squirrelmail that I retrived via CVS. Because I only > need a "snapshot", I want to delete all the CVS directories in the tree. > I've used the command (find . -name "CVS" -print) from the top of the > tree and it appears to find the files I want. Heres a snip: > > blacklamb# find . -name "CVS" -print > ./CVS > ./config/CVS > ./data/CVS > ./doc/CVS > ./functions/CVS > ./help/id/CVS > ./help/ca/CVS > ./help/cs/CVS > ./help/th/CVS > ./help/en/CVS > [etc.] > > Now what I want to do is remove those files so I've tried (find . -name > "CVS" -ok "rm {}";) and various versions of the command but can't get > the syntax right. How should I construct this command? > > Thanks, > > Drew > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message