[NTLUG:Discuss] searching text in all files for match

Chris Cox cjcox at acm.org
Wed Jun 5 10:02:06 CDT 2002


Fred James wrote:

> My brain is stuck - trying to remember how to search all text files on 
> the machine for matches to a text string.  Any nudges?
>
find . -type f | xargs file | grep -i text | cut -f1 -d: | xargs grep 
"search for this"

From: http://www.unixreview.com/documents/s=1237/urm0103h/0103h.htm






More information about the Discuss mailing list