是这样的,gzip的压缩就是一对一,也就是一个文件源文件压缩到一个目标文件, 所以,一个压缩包只能解压出一个文件,是不可能存在多个文件的。这是GZIP的特性决定了的。通常,都是把多个文件用tar先压成一个包,然后在gzip。 解压也是先unzip,然后untar得到多个文件。 -----the gzip utility does not archive multiple files into one file. On the contrary, gzip compresses one file into one gzip file. In order to compress multiple files, one must first use another utility called TAR. TAR uses an archival algorithm to join multiple files into one file.
所以,一个压缩包只能解压出一个文件,是不可能存在多个文件的。这是GZIP的特性决定了的。通常,都是把多个文件用tar先压成一个包,然后在gzip。
解压也是先unzip,然后untar得到多个文件。
-----the gzip utility does not archive multiple files into one file. On the contrary, gzip compresses one file into one gzip file. In order to compress multiple files, one must first use another utility called TAR. TAR uses an archival algorithm to join multiple files into one file.
http://commons.apache.org/compress/