Entries from September 2006

Recursive Find and Replace in Linux

Date September 25, 2006 by Isaac

Believe it or not this actually took some time to find, so I am posting it here for future reference. To do a find and replace recursively in Linux type:
 
find ./ -type f | xargs sed -i ’s/string1/string2/g’
 
That will replace every occurrence of “string1″ with “string2.”