For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > November 2005 > Re: Recursive patter search in UNIX









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Recursive patter search in UNIX
Erik de Castro Lopo

2005-11-18, 7:01 pm

David Wahler wrote:
>
> Jim Cochrane wrote:
>
> I tend to prefer:
> find . -type f -print0 | xargs -0r grep -l '\<ABC\>'
>
> This avoids the overhead of restarting grep for each file; if you have
> a lot of files and a slow computer, this can noticeably speed up the
> process.


Why not:

grep -l -r ABC .

This works with GNU grep.

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"You don't have make it your sole purpose in life, but could you at
least sacrifice a rubber chicken upon the altar of literacy?"
-- TackHead on Slashdot
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com