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

 

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

1 tar -vxtf adtxxxx.zip

结果报错提示

gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now

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

最后终于发现一例

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 就有提示,最后一句命令搞定:

unzip adt-bundle-linux-x86_64-20131030.zip -d /home/administrator/work/adt2/

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

 

转载于:https://www.cnblogs.com/lin2yatou/p/3599077.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值