Could ARG_MAX be increased?
David O'Brien
obrien at FreeBSD.ORG
Thu Sep 23 12:37:20 PDT 2004
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 at 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 at FreeBSD.org)
More information about the freebsd-current
mailing list