Find all files with the extension .txt in the /tmp directory and execute the command sed to replace all occurrences of oldtext with newtext in each file.
find '/tmp' -name '*.txt' -exec sed -i 's/oldtext/newtext/g' {} \;