Skip to main content

Find files with Name X containing Text Y

Useful and fast:

find -type f -name 'filename' -exec grep -H 'text to find' {} +

Same result and maybe even better performance:

grep -rnw --include="filename" . -e 'text to find'