Monday, June 1, 2009

how to search string in files on unix system

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