unzip解压大小限制-End-of-central-directory signature not found

unzip 解压大小限制

# unzip network.zip 
Archive:  network.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 network.zip or
        network.zip.zip, and cannot find network.zip.ZIP, period.

原因

根据unzip官网介绍:

For the UnZip 6.0 release, we want to give special credit to Myles Bennet, who started the job of supporting ZIP64 extensions and Large-File (> 2GiB) and provided a first (alpha-state) port.

也就是说:目前unzip只支持低于2GB的文件,大于2GB的还在开发中,和系统的位数有关。

PS:我们目前普遍使用的unzip还是2009年发布的,真是经久弥坚!

解决

使用7z解决

下载最新7zip:https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_x86_linux_bin.tar.bz2/download

// 解压 
tar -jxvf p7zip_16.02_x86_linux_bin.tar.bz2

// 安装
# sh install.sh 
- installing /usr/local/bin/7za
- installing /usr/local/bin/7zr
- installing /usr/local/bin/7z
- installing /usr/local/lib/p7zip/7zCon.sfx
- installing /usr/local/lib/p7zip/7z.so
- installing /usr/local/lib/p7zip/Codecs
- 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/DOC

# 7za x network.zip 
/usr/local/bin/7za: /usr/local/lib/p7zip/7za: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

// 缺少依赖就装
# sudo yum install glibc.i686 

了解7z软件:http://www.linuxdiyf.com/view_193969.html

再解压

// 然后经过长时间的解压就ok了
# 7za x network.zip 

7-Zip (a) [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,32 bits,6 CPUs QEMU Virtual CPU version 1.5.3 (6D3),ASM)

Scanning the drive for archives:
1 file, 4294967296 bytes (4096 MiB)

Extracting archive: network.zip

ERRORS:
Unexpected end of archive

--
Path = network.zip
Type = zip
ERRORS:
Unexpected end of archive
Physical Size = 4294967296
Embedded Stub Size = 4

	30% - network.csv

其中报了个错:Unexpected end of archive, 但依然在解压,最后只接压出一部分,确认是来源时压缩得有问题,但是如果来源压缩得正确,那也可以解压正确。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章