How to search for a string in a group of text files from the Linux command line

If you have ever wanted to recursively search through all of the files in a directory for a specific string, here is the bash command to do it:

find . | xargs grep ‘string’ -sl

Leave a Reply