Monday, May 2, 2011

Recursively Search Files Containing Text in Unix

find . -exec grep -H -n -I 'hello' {} \;

The above command will search all files in the current directory and any sub directories for the text 'hello'. Replace 'hello' with whatever text you are trying to find.

No comments:

Post a Comment