当我从Activiti6.0 GitHub上下载下来.zip的源码的时候,打算用tar命令解压文件
结果报错提示:
造成错误的原因是因为tar的底层间接调用了gzip,而gzip的使用是有限制的:Files created by zip can be uncompressed by gzip only if they have a single member compressed with the 'deflation' method,也就是说单文件用deflation压缩的包(.tar结尾的压缩包)才可以用gzip做解压操作。
解决办法:使用unzip做解压操作。
unzip语法:
unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
示例:
unzip apache-tomcat-8.0.53.zip -d /home/user/code
注:-d为指定输出文件夹,不指定就是解压到当前文件夹。