Replacing text in a directory tree

Sometimes you want to replace one piece of text with another in all files in a whole directory tree.

*nix and sed to the rescue.


find ./ -type f -exec sed -i ’s/queryString/replaceString/g’ {} \;