Cygwin踩坑记录(三)-tar命令解压.zip文件提示“gzip: stdin has more than one entry--rest ignored”

当我从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为指定输出文件夹,不指定就是解压到当前文件夹。

猜你喜欢

转载自blog.csdn.net/qq_19734597/article/details/84402908