首页 > 其他 > 详细

tar 解压.zip文件报错解决一例: gzip: stdin has more than one entry--rest ignored

时间:2014-03-14 18:42:59      阅读:611      评论:0      收藏:0      [点我收藏+]

 

折腾完了ubuntu,下载一个adt来工作和学习,下载好了发现是一个.zip格式的压缩包,而不是常见.tar.gz刚用了几次tar命令,正好试试,

bubuko.com,布布扣
1 tar -vxtf adtxxxx.zip
bubuko.com,布布扣

结果报错提示

bubuko.com,布布扣
gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now
bubuko.com,布布扣

百思不得其解,还以为自己半瓶子用错了,搜了几个其他配合的参数也不管用。

最后终于发现一例

http://lists.gnu.org/archive/html/bug-tar/2008-09/msg00014.html

原来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压缩的包才可以用gzip解压,好在有workaround ---- unzip

unzip用法也非常简单,直接敲unzip 就有提示,最后一句命令搞定:

bubuko.com,布布扣
unzip adt-bundle-linux-x86_64-20131030.zip -d /home/administrator/work/adt2/
bubuko.com,布布扣

-d为指定输出文件夹,不制定貌似就放到pwd,当前文件夹了。

tar 解压.zip文件报错解决一例: gzip: stdin has more than one entry--rest ignored,布布扣,bubuko.com

tar 解压.zip文件报错解决一例: gzip: stdin has more than one entry--rest ignored

原文:http://www.cnblogs.com/lin2yatou/p/3599077.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!