找到匹配字符替换目录下包括子目录的所有文件

sed -i 's/你好帅(你好)/太帅了/g' `grep "你好帅(你好)" -rlR /data/www/mike/Static`

find /data/vip -type f -name "main.php" |xargs sed 's/rm-xxxxxx.mysql.rds.aliyuncs.com/rm-xxxxxxxxx180.mysql.rds.aliyuncs.com/g' -i

原文地址:https://www.cnblogs.com/mikeluwen/p/7068864.html