Date: Thu, 23 Sep 2004 19:37:20 +0000 From: David O'Brien <obrien@FreeBSD.ORG> To: Juha Saarinen <juhasaarinen@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: Could ARG_MAX be increased? Message-ID: <20040923193720.GB10928@hub.freebsd.org> In-Reply-To: <b34be84204092312336001936a@mail.gmail.com> References: <b34be84204092304456066b0a0@mail.gmail.com> <009301c4a173$d468de90$7890a8c0@gits.invalid> <b34be84204092312336001936a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 24, 2004 at 07:33:27AM +1200, Juha Saarinen wrote: > On Thu, 23 Sep 2004 15:46:26 +0200, Cyrille Lefevre > <root@gits.dyndns.org> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040923193720.GB10928>