How can I grep for a certain string recursively in all .htaccess files?
grep -r -n -H -I 'string' .htaccess
doesn't seem to work.
I'm on a GNU Linux system.
cd to a folder before the folders that store the htaccess
$find . -name ".htaccess" -exec grep -r -n -H -I 'string' {} \;
Use the --include
option:
grep -rnHI 'pattern' --include=.htaccess .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With