main logo
Subject: Re: [ProLinux] Search files for string
Author: Ed Leafe
Posted: 2006/01/31 12:49:54
 
View Entire Thread
New Search


On Jan 31, 2006, at 12:08 PM, Matthew Jarvis wrote:

> never mind - I think I got it (missed it when I RTFM)...
>
> grep "searchstring" -H
>
> now if I could do the subdirs....

I typically use:
grep -HInri 'searchstring' *
The 'I' limits the search to non-binary (i.e., text) files; 'n'
includes the line number, 'r' is the recursive bugger you're looking
for, and 'i' makes the match case-insensitive.


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com






 
©2006 Ed Leafe
<-- Prior Message New Search Next Message -->