Find all files with the extension ".txt" in the entire file system and replace the string "your_pattern" with "your_replacement" in each of those files.
find / -name "*.txt" | xargs sed -i "s/your_pattern/your_replacement/"