排除所有tomcat下的logs日志
tar -zcvf tomcat.tar.gz t-7016 t-7018 t-7019 t-8889 t-9090 t-8899 t-8900 --exclude=t-7016/logs --exclude=t-7018/logs --exclude=t-7019/logs --exclude=t-8889/logs --exclude=t-9090/logs --exclude=t-8899/logs --exclude=t-8900/logs
openeluer24.03下tar命令需要注意顺序:排除目录要写在计划打包目录的前面
tar -zcvf ora.tar.gz --exclude=oracle/oradata oracle
相关参考:
linux tar打包压缩排除某个目录或文件 - 小鱼阁工作室 - 博客园