[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: searching inside files with find, cat and grep as a oneliner ...



On Fri, Sep 17, 2010 at 11:07:53PM -0600, Bob Proulx wrote:
> Albretch Mueller wrote:

> But newer POSIX standard find can use a {} + to launch grep once and
> to pass as many files on the command line as the system allows.  That
> is faster since grep is launched only as many times as needed.
> Usually only once.
> 
>   $ find -name '*.extension' -exec grep -H 'pattern' {} +

Wow! I thought that such things can be done only by xargs. Thank you very much!

-- 
Regards,
Alexander Batischev

1024D/69093C81
F870 A381 B5F5 D2A1 1B35  4D63 A1A7 1C77 6909 3C81

Attachment: signature.asc
Description: Digital signature


Reply to: