Find all files with the extension .txt and execute the command to replace the word "word" with "anotherword" in each file, creating a backup of the original file with the extension .bak.
find . -name '*.txt' -exec sed -i.bak 's/word/anotherword/' {} \;