解决gzip: stdin has more than one entry--rest ignored

分类:CentOS运维 阅读:36410 次

今天用 tar 命令解压 .zip 文件报错:

gzip: stdin has more than one entry--rest ignored tar: Child returned status 2 tar: Error is not recoverable: exiting now 上网查找发现是因为tar命令调用了gzip,而gzip并不是可以解压所有文件的,有如下一段话:

Files created by zip can be uncompressed by gzip only if they have a single member compressed with the 'deflation' method.

后来用以下命令解决:(unzip命令,-d指定输出目录)

 unzip xxxxxx.zip -d /home/acer/Desktop/