|
|
刚刚在学习linux的过程中,下载了zip压缩包,用tar命令无法解压,提示错误如下:
gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now
然后,只有使用unzip命令来解压才能成功。
虽然问题解决了,但是为啥呢?
原因如下:
详情可见: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,当前文件夹了。 |
|