From owner-freebsd-questions Wed Nov 6 11:43:55 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA6A637B401 for ; Wed, 6 Nov 2002 11:43:54 -0800 (PST) Received: from rtk1.rtk.net.pl (rtk1.rtk.net.pl [217.97.232.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 993E643E3B for ; Wed, 6 Nov 2002 11:43:42 -0800 (PST) (envelope-from yhpx@alpha.net.pl) Received: from pablo-1.rtk-local ([192.168.103.119] helo=ember.blah) by rtk1.rtk.net.pl with smtp (Exim 3.12 #1 (Debian)) id 189W5C-000717-00 for ; Wed, 06 Nov 2002 20:43:22 +0100 Received: (qmail 2144 invoked by uid 1001); 6 Nov 2002 19:42:58 -0000 Date: Wed, 6 Nov 2002 20:42:57 +0100 From: Dominik Lupinski To: Matthew Bettinger Cc: freebsd-questions@FreeBSD.ORG Subject: Re: simple find command Message-ID: <20021106204257.A1916@ember.blah> References: <200211061124.25334.mbettinger@championelevators.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200211061124.25334.mbettinger@championelevators.com>; from mbettinger@championelevators.com on Wed, Nov 06, 2002 at 11:24:19AM -0600 Organization: --t-r-a-n-s-h-u-m-a-n-s--> X-Operating-System: FreeBSD 4.7-STABLE X-PGP-key: http://venus.wsb-nlu.edu.pl/~dlupinsk/yhpx.asc 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 Wed, Nov 06, 2002 at 11:24:19AM -0600, Matthew Bettinger wrote: > I am having a bit of trouble with the find command. I am a novice in its use > so maybe someone can help me out here. > > I have a list of files (hundreds) in directory . and need to search through > and delete every file that contains the word foo. [...] find . -name "*foo*" -exec rm {} \; find . -name "*foo*" -print | xargs rm find . -name "*foo*" -delete //the fastest one -- 0A 0D 0A 2D 2D 20 0D 0A 44 6F 6D 69 6E 69 6B 20 ...-- ..Dominik 4C 75 70 69 6E 73 6B 69 20 2F 2F 20 79 68 70 78 Lupinski // yhpx 40 61 6C 70 68 61 2E 6E 65 74 2E 70 6C 0D 0A 2E @alpha.net.pl... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message