Date: Sat, 30 May 2009 18:12:25 +0200 From: Mel Flynn <mel.flynn+fbsd.questions@mailing.thruhere.net> To: freebsd-questions@freebsd.org Cc: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> Subject: Re: find and searching for specific expression in files Message-ID: <200905301812.25320.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> In-Reply-To: <alpine.BSF.2.00.0905301755170.18381@wojtek.tensor.gdynia.pl> References: <dd6b168d2af9ddbcfc52e5c0397e4d6a.squirrel@relay.lc-words.com> <200905301412.50958.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> <alpine.BSF.2.00.0905301755170.18381@wojtek.tensor.gdynia.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 30 May 2009 17:57:14 Wojciech Puchar wrote: > >> because it tells you the file in which the text pattern was found :). > > > > Discouraged because: > > - it's possible to hit maxarglen if the root directory has many > > subdirectories. > > xargs is usefull too. i would it as forking for each > file will make processing really slow. xargs can cut input data into given > chunks with -n option, so grep will be called for say 100 files at once. Cut off the message a bit later and you will see that using a '+' to terminate the exec primitive emulates xargs behavior: On Saturday 30 May 2009 14:12:50 Mel Flynn wrote: > I use + rather then ; so that one >invocation for grep is done whenever maxarglen is hit (like if you used >xargs(1)), rather then one grep per file. -- Mel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905301812.25320.mel.flynn%2Bfbsd.questions>