1.如果是大文件.zip解压的话会报如下错误(4GB以上)
Archive: insightone.zip
warning [insightone.zip]: 7093235758 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [insightone.zip]: start of central directory not found;
zipfile corrupt.
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
解决方法
wget http://nchc.dl.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2
tar -jxvf p7zip_9.20.1_src_all.tar.bz2
cd p7zip_9.20.1
make
make install
依次运行以上代码,因为自带的zip解压工具比较老,我们只有下载新的7zip(linux系统下)才可以解压,解决方法中的第一行就是下载解压工具的压缩包,第二步,解压安装包,第三步切换到安装包目录,第四步和第五步就是安装了。
# 最后一步make install后出现以下信息,即为安装完毕。
./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip
- installing /usr/local/bin/7za
- installing /usr/local/man/man1/7z.1
- installing /usr/local/man/man1/7za.1
- installing /usr/local/man/man1/7zr.1
- installing /usr/local/share/doc/p7zip/README
- installing /usr/local/share/doc/p7zip/ChangeLog
- installing HTML help in /usr/local/share/doc/p7zip/DOCS
安装完成之后就可以运行命令进行解压了,注意cd到压缩包目录
7za x 文件名.zip
至此完成大文件zip在linux系统下的解压过程
下面是关于 7za 的补充操作
a 向压缩包里添加文件或创建压缩包
(如向001.7z添加001.jpg,执行:7za a 001.7z 001.jpg;将001目录 打包执行:7za a 001.7z 001;)
d 从压缩里删除文件
(如将001.7z里的001.jpg删除,执行:7za d 001.7z 001.jpg)
l 列出压缩包里的文件
(如列出001.7z里的文件,执行:7za l 001.7z)
e 解压到当前目录,目录结构会被破坏
(如001.rar内有如下目录及文件123/456/789.html,执行:
7za e 001.rar,目录123和456及文件789.html都会存放在当前目录下。
x 以完整路径解压