unzip无法解压缩大于4G的文件

从Windows平台通过FTP上传一个大小约为11G的zip文件到Linux系统(CentOS Linux release 7.9.2009)上,使用unzip解压过程中出现如下错误:

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 theappropriate BINARY mode and that you have compiled UnZip properly)

从网上搜索了一下相关资料,发现是当前的unzip版本不支持4G以上的压缩包。要么升级到最新版本的unzip,要么使用7-Zip forLinux版本的的p7zip。

[root@master ~]# unzip -v
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

7zip是一个开源的压缩软件,非常小巧,提供的功能和WinRAR差不多,但支持的格式几乎比后者多一倍。7z完全开源,包括压缩算法,而且还可以方便地使用它提供的库,在自己的程序中集成压缩功能。它使用 7z 这种新的压缩格式,并支持高压缩比。因此它被认为是比先前提及的压缩工具更好的软件。在 Linux 下可以通过 p7zip 软件包得到,该软件包里包含 3 个二进制文件:7z/7za/7zr

安装7ZIP

7-zip以高压缩率著称,并且是一款免费开源的压缩软件。在常规的Linux发行版中,无法通过简单的yum命令来安装该软件。那么在CentOS中,如何安装7ZIP呢?
有以下3种方法:

第一种,源码编译安装

官网下载地址:
开源文件项目地址:http://sourceforge.net/projects/p7zip/,目前最新版为9.20.1。
执行以下命令下载安装:

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# 最后一步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

第二种,rpm安装

下载地址:http://pkgs.repoforge.org/p7zip/,请以最新版为准。
在 CentOS 5.x 32位下安装7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.i386.rpm
rpm -ivh p7zip-9.20.1-1.el5.rf.i386.rpm

在 CentOS 5.x 64位下安装7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.x86_64.rpm
rpm -ivh p7zip-9.20.1-1.el5.rf.x86_64.rpm

在 CentOS 6.x 32位下安装7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.i686.rpm
rpm -ivh p7zip-9.20.1-1.el6.rf.i686.rpm

在 CentOS 6.x 64位下安装7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.x86_64.rpm
rpm -ivh p7zip-9.20.1-1.el6.rf.x86_64.rpm

第三种,yum安装

命令如下:

yum install -y p7zip

使用7zip的命令是7za。
安装完成后的使用方法:
命令格式:7za {a|d|l|e|u|x} 压缩包文件名 {文件列表或目录可选}

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  以完整路径解压

zip文件解压中文文件乱码问题
由于zip文件中没有声明其编码,所以在Linux上使用unzip解压以默认编码解压,中文文件名会出现乱码。

The future can only be determined by will and hard work.

error [XXX.zip]: start of central directory not found; zipfile corrup相关推荐

  1. unzip解压缩linux文件时出现error [Testing.zip]: start of central directory not found;zipfile corrupt——7z

    仅作为记录,大佬请跳过. 经过师兄的指点,这个bug是因为unzip无法解压缩大于4G的文件. 文章目录 解决 解决 用7za x Training.zip 参考 感谢大佬博主文章:传送门

  2. VScode离线安装插件报错Corrupt ZIP: end of central directory record signature not found解决

    我们从官方下载的插件包,通过install from VSIX安装的时候会报出Corrupt ZIP: end of central directory record signature not fo ...

  3. vscode——运行程序报错 cc1plus.exe: fatal error: xxx: No such file or directory

    问题描述 当我点击运行我编写的 c.cpp文件时,产生了如下错误:cc1plus.exe: fatal error: Vscode\c.cpp: No such file or directory 我 ...

  4. Can‘t find end of central directory:is this a zip file?

    Can't find end of central directory:is this a zip file?导出word模板遇到的错误 JSZipUtils.getBinaryContent('te ...

  5. Linux使用解压命令unzip报错:unzip: cannot find zipfile directory in one of xxx.zip

    在linux服务器下使用rz上传压缩文件,用unzip命令解压zip包 #xxx.zip 压缩的包名 unzip xxx.zip Archive: QY.zipEnd-of-central-direc ...

  6. VS Code报错解决:Error: end of central directory record signature not found

    早上刚配好远程的Linux开发环境:Windows下使用VS Code远程SSH连接Linux服务器进行开发 然后我在安装C/C++插件的时候出现了报错: ownloading package 'C/ ...

  7. electron 打包后启动应用报错:Error: ENOENT: no such file or directory, open ‘xxx/manifest.json‘‘

    使用 electron-builder 打包后启动报错: Reading /xxx/manifest.json failed. Error: ENOENT: no such file or direc ...

  8. 【已解决】Error: ENOENT: no such file or directory, open ‘F:\xxx\node_modules\echarts

    背景 最近在做毕设项目的时候,需要用到 echarts 来渲染数据,突然遇到这个错误 Error: ENOENT: no such file or directory, open 'F:\xxx\no ...

  9. Module build failed: Error: ENOENT: no such file or directory, scandir node_modules\node-sass\vendor

    npm install 报错 Module build failed: Error: ENOENT: no such file or directory, scandir 'D:\workspaces ...

最新文章

  1. java用画线写字_用Java画线
  2. 平台篇-58 HBase 平台实践和应用
  3. dtree.js树的使用
  4. SQL Server 中的ROWID
  5. Tomcat的安装配置与JavaWeb入门教程
  6. python异常值检测的方法_Python实现非正太分布的异常值检测方式
  7. log4j:WARN No appenders could be found for logger
  8. (BFS)Knight Moves(hdu1372)
  9. poj 2406 还是KMP的简单应用
  10. ubuntu修改文件夹权限
  11. Spring_自动装配
  12. 019.nexus搭建docker镜像仓库/maven仓库
  13. 用python开发文本翻译小软件
  14. ADC最佳SNR性能取决于输入低噪声信号和基准电压
  15. Reservior Sampling(蓄水池采样) in Data Streams
  16. 【hive】beeline常用操作指令
  17. 【实验室集训大作业】JDBC实现宠物商店
  18. 商务洽谈(谈判)步骤及技巧
  19. postgresql tips
  20. modprobe 及 配置文件 /etc/modprobe.conf

热门文章

  1. 普通人的2022春招总结(阿里、腾讯offer)
  2. 安乐高机器人图纸_乐高机器人搭法,乐高机器人 8547 搭建图纸 PDF文件
  3. 银行业灾备及业务连续性管理:从混沌走向清明
  4. python起源,概念
  5. APP在线抢答解决方案(RTC直播间抢答或者抢背唱歌)
  6. 牛客寒假训练营4-爆炸的符卡洋洋洒洒 (dp变形)
  7. three.js 07-06 之 Sprite 一幅图片多个精灵
  8. 项目经理之项目经理的选拔
  9. 网易互娱AI Lab视频动捕技术iCap被CVPR 2022接收!
  10. ICAP互换客户端地址协议iOS实现示例