Find all files in the current directory and its subdirectories with the extension ".doc", and execute the command "sed -i 's/old/new/g' {}" on each of them.
find ~/* -type f -name "*.doc" -exec sed -i 's/old/new/g' {} \;