Recursive grep FTW

In case you’re trying to search recursively for a specific file type and data mask, grep -r is not enough to bring the desired result.
You’ll have to use –include ‘type’ and then, even if the directory does not contain any of the given filetype in root, it’s still working.


grep -r --include '*.extension' 'Text to match' directory
grep -r --include '*.cpp' 'Audio' .