From owner-freebsd-questions@FreeBSD.ORG Fri Feb 10 18:29:56 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F76A106566C for ; Fri, 10 Feb 2012 18:29:56 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from mail.mroute.net (lax-gw12.mailroute.net [199.89.0.112]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCE88FC15 for ; Fri, 10 Feb 2012 18:29:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by lax-gw12.mroute.net (Postfix) with ESMTP id C2736327081E; Fri, 10 Feb 2012 18:29:54 +0000 (UTC) X-Virus-Scanned: by MailRoute Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by lax-gw12.mroute.net (Postfix) with ESMTP id C2A1D3270816; Fri, 10 Feb 2012 18:29:53 +0000 (UTC) Received: by red.stonehenge.com (Postfix, from userid 1001) id B0A272B2B; Fri, 10 Feb 2012 10:29:53 -0800 (PST) From: merlyn@stonehenge.com (Randal L. Schwartz) To: Matthew Seaman References: <1237723287.20120207235924@yandex.ru> <4F31A260.20109@infracaninophile.co.uk> <20120207231716.31aa8bc3@gumby.homeunix.com> <20120209032544.GA58560@ozzmosis.com> <4F3541D6.5080505@infracaninophile.co.uk> x-mayan-date: Long count = 12.19.19.2.5; tzolkin = 1 Chicchan; haab = 13 Pax Date: Fri, 10 Feb 2012 10:29:53 -0800 In-Reply-To: <4F3541D6.5080505@infracaninophile.co.uk> (Matthew Seaman's message of "Fri, 10 Feb 2012 16:12:06 +0000") Message-ID: <86zkcqr17i.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: 'rm' Can not delete files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 18:29:56 -0000 >>>>> "Matthew" == Matthew Seaman writes: Matthew> find . -type f -depth 1 -exec rm -f '{}' ';' Matthew> but let's not leave people in any doubt that this is not the Matthew> best option. However... find . -type f -depth 1 -exec rm -f {} + Might very well be a great option. Well, not for something that is also like -delete, but for other things that would have formerly required "-print0 | xargs -0"... this is apparently a fairly recent (and welcome!) modification to find. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion