I found myself having to search through the contents of a bunch of files in Unix the other day, and wanted to find a command to do it for me.
Cue some Googling, and I found exactly what I was looking for here.
find . -name "*" -exec grep -l "somestring" {} \;
You may also like:
find . -name “*” -exec grep -H –line-number “export” {} \;
-H prints the file name for each match
–line-number prints the line number of the matching occurence within the file
Hope you’re well buddy.