Find all files with the extension .txt in the entire file system, and replace all occurrences of "string1" with "string2" in those files.
find / -type f -name "*.txt" -print | xargs sed -i 's/string1/string2/g'