MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
March
Sun Mon Tue Wed Thu Fri Sat
       
9
2007
Months
Mar


Fri, Mar 09, 2007 10:09 pm

Finding a String with a Recursive Grep

If you need to find a specific string in all files of a particular type in the current directory and all directories beneath it, you can use a command similar to the following:
find . -name "*.php" -exec grep "noindex" {} /dev/null \;

In this case I want to find all of the PHP files where I have included the string "noindex" in a META tag.

References:

  1. Greg Hinkel's UNIX Tip of the Week for March 3, 1996

[/os/unix/commands] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo