How can I grep for a specific line recursively in all .htaccess files?
grep -r -n -H -I 'string' .htaccess
doesn't seem to work.
I am on a GNU Linux system.
cd to the folder in front of the folders where htaccess is stored
$find . -name ".htaccess" -exec grep -r -n -H -I 'string' {} \;
Use option --include:
--include
grep -rnHI 'pattern' --include=.htaccess .
"", :
$ find /usr/local -type f -name ".htaccess" -exec grep -rnHI 'pattern' {} \;
, . "find" /usr/local.
Source: https://habr.com/ru/post/1714277/More articles:Compatible VistaDB with Microsoft Enterprise Library DAAB? - databasePdf reading detection in MsIE - internet-explorerPython: how to import part of a namespace - pythonCenter rotation UIView - iphoneThe most compact way to count the number of lines in a file in C ++ - c ++C ++ STL map typedef errors - c ++Effective customer interaction RESTful - restCancel transaction - sql-serverIs it possible to change / limit dynamicfilter values ββin asp.net - c #Django ManyToMany add () error - pythonAll Articles