linux unzip 解压 zip 文件


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,当前文件夹了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM