Batch Find and Replace with the Linux Command Line
Copied from http://jerrywaller.wordpress.com/2010/01/07/batch-find-and-replace-with-the-linux-command-line/
perl -pi -w -e ‘s/wrong/right/g;’ *.html
Replaces all instances of ‘wrong’ with ‘right’ in html files within the current working directory.
grep -rl “wrong” /home/jerrywaller | xargs sed -i ‘s|wrong|right|g’
Recursively replaces ‘wrong’ with ‘right’ within the designated directory.