通过ftp向linux系统上传了一个12G的zip文件,运行unzip解压命令报错:
root@VM-4-14-debian:/www/wwwroot/www.codesou.cn# unzip templets.zip
Archive: templets.zip
warning [templets.zip]: 9399700197 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [templets.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)
百度了一下发现超过4G的zip文件在linux下就无法正常通过unzip命令解压了,要用到第三方工具,这里我们使用7zip,各版本的安装命令如下:
Debian、Ubuntu
sudo apt install p7zip-full p7zip-rar
Fedora、Red Hat Linux Enterprise、Centos
sudo dnf install p7zip
OpenSUSE:
sudo zypper install p7zip
Arch Linux
sudo pacman -S p7zip
我这里是Debian系统,因此运行第一种命令:
root@VM-4-14-debian:# sudo apt install p7zip-full p7zip-rar
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dh-python libpython3.7
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
p7zip-full p7zip-rar
0 upgraded, 2 newly installed, 0 to remove and 62 not upgraded.
Need to get 1,221 kB of archives.
After this operation, 4,897 kB of additional disk space will be used.
Get:1 http://mirrors.tencentyun.com/debian buster/main amd64 p7zip-full amd64 16.02+dfsg-6 [1,164 kB]
Get:2 http://mirrors.tencentyun.com/debian buster/non-free amd64 p7zip-rar amd64 16.02-3 [57.6 kB]
Fetched 1,221 kB in 2s (541 kB/s)
Selecting previously unselected package p7zip-full.
(Reading database ... 79183 files and directories currently installed.)
Preparing to unpack .../p7zip-full_16.02+dfsg-6_amd64.deb ...
Unpacking p7zip-full (16.02+dfsg-6) ...
Selecting previously unselected package p7zip-rar.
Preparing to unpack .../p7zip-rar_16.02-3_amd64.deb ...
Unpacking p7zip-rar (16.02-3) ...
Setting up p7zip-full (16.02+dfsg-6) ...
Setting up p7zip-rar (16.02-3) ...
Processing triggers for man-db (2.8.5-2) ...
然后运行 7za 命令解压即可:
7za x templets.zip
想要了解更多内容,请持续关注码农资源网,一起探索发现编程世界的无限可能!
本站部分资源来源于网络,仅限用于学习和研究目的,请勿用于其他用途。
如有侵权请发送邮件至1943759704@qq.com删除
码农资源网 » Linux系统无法解压过大的zip文件的解决办法(warning [xxx.zip]: xxx extra bytes at beginning or within zipfile (attempting to process anyway) error [templets.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)
本站部分资源来源于网络,仅限用于学习和研究目的,请勿用于其他用途。
如有侵权请发送邮件至1943759704@qq.com删除
码农资源网 » Linux系统无法解压过大的zip文件的解决办法(warning [xxx.zip]: xxx extra bytes at beginning or within zipfile (attempting to process anyway) error [templets.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)