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

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

posted @ 2017-06-23 11:03  行知散人  阅读(275)  评论(0编辑  收藏  举报