tar -zcvf apache-tomcat-9.0.----before-upgrade.tar.gz apache-tomcat-9.0./ --exclude=apache-tomcat-9.0./logs --exclude=apache-tomcat-9.0./work
注意,--exclude后面跟路径名称,最后一个符号一定不能用/闭合
以下为错误的用法,请注意比对差异
tar -zcvf apache-tomcat-9.0.13-2018-12-23-before-upgrade.tar.gz apache-tomcat-9.0.13/ --exclude=apache-tomcat-9.0.13/logs/ --exclude=apache-tomcat-9.0.13/work/