Find all files with the extension .txt in the current directory and its subdirectories, and replace all occurrences of 'a' with 'b' in each file.
find ./ -type f -name "*.txt" -exec sed -i 's/a/b/g' {} \;