linux 常用命令 李刚

sed -i "s/字符串1/字符串2/g" `grep 字符串1 -rl 目录`  替换目录下所有文件中 等于字符串1的字符为字符串2

-------------------------------------------------

tar 批量压缩备份tomcat 跳过 logs 目录

tar -zcvf  web.tar.gz --exclude=*/logs/*  ./*

原文地址:https://www.cnblogs.com/ligang0357/p/10399700.html