From owner-freebsd-current@FreeBSD.ORG Thu Sep 23 19:37:20 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 664) id 1A31816A4CF; Thu, 23 Sep 2004 19:37:20 +0000 (GMT) Date: Thu, 23 Sep 2004 19:37:20 +0000 From: David O'Brien To: Juha Saarinen Message-ID: <20040923193720.GB10928@hub.freebsd.org> References: <009301c4a173$d468de90$7890a8c0@gits.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.10-STABLE Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: Cyrille Lefevre cc: freebsd-current@freebsd.org Subject: Re: Could ARG_MAX be increased? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-current@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 19:37:20 -0000 On Fri, Sep 24, 2004 at 07:33:27AM +1200, Juha Saarinen wrote: > On Thu, 23 Sep 2004 15:46:26 +0200, Cyrille Lefevre > wrote: > > how about grep -r ou find | xargs grep ! > > How does that work, out of curiosity? > > You can use the -exec feature of 'find' other wise - > > find . -type f -exec grep "something" {} /dev/null \; Using the '-exec' feature of 'find' fork+exec for *every* file found. Using xargs reduces the number of fork+exec by the number of filenames that fit on the command line. So it runs much quicker. -- -- David (obrien@FreeBSD.org)