Find all files in the current directory (and its subdirectories) whose name matches the pattern '*.*' and execute the command 'sed -i '' 's/foo/bar/g' {} \;' on each of them.
find ~ -iname '*.*' -exec sed -i '' 's/foo/bar/g' {} \;