Jul 23, 2013

Search for a string in files


find . -type f -print | grep --color=auto -iR 'string'
 
Grep internally support this as well
grep --color=auto -i -r 'string' /dir

If we want to search in some only extensions, use "--include"
Grep also have --exclude directive.