October 19, 2011

linux search & replace multiple files

just note...

find . -name '*.php' -print | xargs sed -i -e 's/OLD-STRING/NEW-STRING/g'

find ./ -type f -print | xargs sed -i -e 's/OLD-STRING/NEW-STRING/g'

No comments: