From owner-freebsd-questions Thu Dec 6 14:15:27 2001 Delivered-To: freebsd-questions@freebsd.org Received: from blacklamb.mykitchentable.net (ekgr-dsl2-77.citlink.net [207.173.226.77]) by hub.freebsd.org (Postfix) with ESMTP id 719E237B417 for ; Thu, 6 Dec 2001 14:15:22 -0800 (PST) Received: from tagalong (unknown [165.107.42.150]) by blacklamb.mykitchentable.net (Postfix) with SMTP id 4EC98EE64C for ; Thu, 6 Dec 2001 14:16:54 -0800 (PST) Message-ID: <000f01c17ea3$7bc9db40$962a6ba5@lc.ca.gov> From: "Drew Tomlinson" To: Subject: How to Use Find To Remove Files? Date: Thu, 6 Dec 2001 14:14:52 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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'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