Search for a string of characters in files of a specific type

If we want to find specific text, e.g. “Ania” only in PHP files:

find . -name "*.php" -print0 | xargs -0 grep "Ania"

 

5/5 - (3 votes)

Leave a Comment

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

Scroll to Top