% perl -pi.bak -e 's/OLDSTRING/NEWSTRING/g' *.html This will leave "*.bak" files around of the original version, in case the replacement string didn't quite do what you wanted.
% perl -pi.bak -e 's/OLDSTRING/NEWSTRING/g' *.html