39. grep
- linux 查找所有文件内容相匹配的文件(查找内容“http://10.43.127.66:8060”的所有文件)
grep -rn "http://10.43.127.66:8060" *
- linux 下查找并替换文件内容
sed -i 's/10.43.166.188/10.43.110.48/g'
grep '10.43.166.188' -rl /home/nginx/html/ --include "*.tpl"``
grep -rn "http://10.43.127.66:8060" *
sed -i 's/10.43.166.188/10.43.110.48/g'
grep '10.43.166.188' -rl /home/nginx/html/ --include "*.tpl"``