Find and list files containing a string

Recursively search all files matching a regexp in the current directory and then listing them.

 bash | 
 
 copy code |
?

1
find . -type f -name "*.file" | xargs grep -l "STRING"

This could also be done like this:

 bash | 
 
 copy code |
?

1
find . -type f -name "*.file" --exec grep -l "STRING" {} \;