Find all files with the extension .txt in the directory /dir/ and execute the command sed to replace the string "old" with "new" in each file.
find /dir/* -name '*.txt' -exec sed -i 's/old/new/g' {} \;