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,當前文件夾了。