Monday, June 1, 2009

how to search string in files on unix system

If you are not already a unix geek, this blog will be useful.  Here is an example to search string in .cgi files in every directory (including current directory), you use this command:

$ find . -name '*.cgi' -exec grep -n 'string to search for' {} \; -print

0 comments:

Post a Comment