Text Link Ads

Thursday, October 11, 2007

Tip for the day: FIND AND EDIT STRINGS

Ever found a need to find for a particular string across the file system and edit all those files which contains that particular string??

Here is a simple way.

Suppose you want to search for a pattern "mphasis" across file system and edit those files..

Just type this at the command prompt:

vi `find . -name "*" -exec grep -l mphasis {} \; -print`

No comments: