From owner-freebsd-questions Sat Dec 29 9:18:12 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp-2.enteract.com (smtp-2.enteract.com [207.229.143.4]) by hub.freebsd.org (Postfix) with ESMTP id 3982637B405 for ; Sat, 29 Dec 2001 09:18:07 -0800 (PST) Received: from jamestown.21stcentury.net (24-148-18-116.na.21stcentury.net [24.148.18.116]) by smtp-2.enteract.com (Postfix) with ESMTP id 9573D5DBA; Sat, 29 Dec 2001 11:18:06 -0600 (CST) Received: (from jtm@localhost) by jamestown.21stcentury.net (8.11.6/8.11.3) id fBTHHko05345; Sat, 29 Dec 2001 11:17:46 -0600 (CST) (envelope-from jtm63@enteract.com) X-Authentication-Warning: jamestown.21stcentury.net: jtm set sender to jtm63@enteract.com using -f To: David Kirchner Cc: Drew Tomlinson , Subject: Re: How to Use Find To Remove Files? References: <20011206151756.D15780-100000@localhost> From: James McNaughton Date: 29 Dec 2001 11:17:40 -0600 In-Reply-To: <20011206151756.D15780-100000@localhost> Message-ID: <86n102kksr.fsf@jamestown.21stcentury.net> Lines: 26 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 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 David Kirchner writes: > On Thu, 6 Dec 2001, Drew Tomlinson wrote: > > > 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? > > find . -name "CVS" -delete > > works on FreeBSD's find. > But if he wants confirmation with the -ok primary then find . -name CVS -ok rm \{\} \; is the one to use. The original problem is that the final ; is a special character for the shell and must be escaped by prepending it with a "\". > > 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