Find all files with the extension .txt in the current directory and its subdirectories, and replace the text "text" with "newtext" in each of those files.
find ./ -name '*.txt' -exec sed -i 's/text/newtext/g' {} \;