Find all files in the current directory (and its subdirectories) with the extension ".txt" and replace all occurrences of "oldword" with "newword" in those files.
find ./ -name ".txt" | xargs sed -i 's/oldword/newword/g'