Monday, October 20, 2008

Finding all files containing a specific string in unix

find [directory_name] -exec grep -li "[search_string]" {} \;

e.g. find . -exec grep -li "xxxx" {} \;

which searches for files containing the string "xxxx" within the current directory.

No comments:

Post a Comment