Return to Snippet

Revision: 19575
at July 17, 2010 00:06 by gabrielsmith


Updated Code
find . -name '*.php' -exec grep -l 'my text pattern' {} \;

Revision: 19574
at October 26, 2009 09:29 by gabrielsmith


Initial Code
find . -name ‘*.php’ -exec grep ‘my text pattern’ {} \;

Initial URL

                                

Initial Description
will search all php files in the current directory and below searching inside each file for the text pattern.  -l switch on grep will only print filename

Initial Title
Linux: Search inside files

Initial Tags

                                

Initial Language
Bash