Wednesday, September 21, 2011

Linux CLI search for a string through multiple recursive files

I had a need to find every instance of a phrase of words or numbers through thousands of files several folders deep.  This command will search every file for the string and report back all files that match it.
grep -lir "Search String" *

No comments:

Post a Comment