说明:
常常在服务器搬家或备份的时候,会用 zip -r 制作一些压缩包,搬的很方便,但搬过去之后,再用unzip解压才发现,压缩包太大,不能用unzip解压。提示如下:
error: Zip file too big (greater than 4294959102 bytes) Archive: moodledata.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of moodledata.zip or moodledata.zip.zip, and cannot find moodledata.zip.ZIP, period.
解压的zip文件大于4GB,在centos下无法正常unzip,这时就需要使用第三方工具来解压,比如7zip。不过,通常7z命令不是系统自带的,VPS源也没有,所以不能用yum直接安装,须手动安装一下
实现:
# wget -c http://packages.sw.be/p7zip/p7zip-9.13-1.el5.rf.i386.rpm # wget -c http://packages.sw.be/p7zip/p7zip-plugins-9.13-1.el5.rf.i386.rpm # rpm -ivh p7zip-9.13-1.el5.rf.i386.rpm # rpm -ivh p7zip-plugins-9.13-1.el5.rf.i386.rpm
依次运行上面四条命令即可完成安装!装好后,就可以运行解压命令了。
# 7z x file.zip