Find and replace string in all files with certain extension in specific directory tree
by Taavi Rammar

Headline has all the information. Here's what you need to type to your shell (don't forget to change path).
shell> find /put/directory/here -name "*.java" | xargs perl -pi -e 's/stringtoreplace/newstring/g'

Should work on redhat.

Copyright by techTips