Find and Replace in multiple Files

This is the Linux CLI-Command Line Interface command to Find all the occurrences of a string and Replace it with desired string in all the files in the directory.  This is very powerful and very fast.  So do take all the precautions before executing this command. The command is

grep -rl STRING1 SOMEDIR/ | xargs sed -i 's/STRING1/STRING2/g'

Explanation: The grep will search for the string 'STRING1' and pipe it to the sed command for the replacements.  The sed command replaces the STRING1 with STRING2  in all the occurrences of the STRING1.