Find all files ending with ".log" in the current directory and its subdirectories, and replace all occurrences of "warning" with "alert" in each file.
find ~ -name "*.log" -exec sed -i 's/warning/alert/gi' {} \;