Posted By

benatkin on 01/19/07


Tagged

grep searching


Versions (?)

Grep for a string in all files in a directory and its subdirectories with a certain extension


 / Published in: Bash
 

Searches all HTML files in current directory and subdirectory for the string "cookiemonster.html". Can be used to find which pages link to a page. Further tweaks can find which source files directly include a file. Both file names and the search string are case insensitive.

  1. fgrep -i 'cookiemonster.html' `find . -iname '*.html' -print`

Report this snippet  

You need to login to post a comment.