Find all files with the extension .txt in the current directory and its subdirectories, and for each of those files, replace all occurrences of "oldword" with "newword" using the sed command.
find ~ -iname '*.txt' | xargs -n1 sed -i 's/oldword/newword/g'