Friday, March 20, 2009

To get the file names only using grep

To get the file names only using grep command

grep findword . -ir | cut -d: -f1

To search in the .php files only

find . -name "*.php" | grep findword -ir | cut -d: -f1