Find all files with the extension .js in the current directory and its subdirectories up to 3 levels deep, and replace all instances of "console.log" with "console.warn" in each file.
find ~ -maxdepth 3 -iname '*.js' -exec sed -i "s/console.log/console.warn/g" {} \;