grep files - Howto's | vitrubio.net

grep files

find content

look for ‘foo’

grep -r 'foo' /path/where/to/look

look for ‘foo’ in files finishing in ‘.bar’

grep -r --include="*.bar" 'foo' /path/where/to/look

look for excactly ‘foo’ in files and show where it appears

grep -nrw /path/whre/to/look -e 'foo'