Linux – search for text in files


Find a string in all files in the current directory

find . | xargs grep 'string' -sl

Limit the search to a certain file type

find . -iname '*php' | xargs grep 'string' -sl

Leave a comment

Your email address will not be published. Required fields are marked *