Date: Thu, 23 Sep 2004 15:44:31 -0400 From: John Baldwin <jhb@FreeBSD.org> To: freebsd-current@FreeBSD.org Cc: David O'Brien <obrien@FreeBSD.org> Subject: Re: Could ARG_MAX be increased? Message-ID: <200409231544.32001.jhb@FreeBSD.org> In-Reply-To: <20040923193720.GB10928@hub.freebsd.org> References: <b34be84204092304456066b0a0@mail.gmail.com> <b34be84204092312336001936a@mail.gmail.com> <20040923193720.GB10928@hub.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Thursday 23 September 2004 03:37 pm, David O'Brien wrote:
> 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.
'grep -r .' even quicker. :)
--
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409231544.32001.jhb>
