无法在 linux 台机器上解压缩 .zip 文件

Unable to unzip .zip file on linux machine

我有一个约 10GB 的大 zip 文件,它是使用标准 Windows 方法创建的(右键单击,select "send to compressed (zipped) folder")。我可以将它解压缩到我的 Macbook 上。

我正在尝试在 EC2 机器上解压缩它。我知道该文件是一个 zip 文件,因为当我 运行 file file.zip 它说:

file.zip: Zip archive data, at least v2.0 to extract

运行unzipreturns出现如下错误:

Archive:  file.zip
warning [file.zip]:  3082769992 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [file.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)

运行 tar xvf file.zip returns 如下:

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains `<{473"D401o1' where numeric         off_t value expected
tar: Archive contains `S42},F466[53' where numeric     time_t value expected
tar: Archive contains ``3c42$:e' where numeric uid_t value expected
tar: Archive contains `565+ܫL2' where numeric gid_t value expected
...etc

有谁知道可能出了什么问题?

实际上,7-zip 应该可以做到这一点,您可以通过以下方式安装它:

sudo apt-get install p7zip-full

然后,您可以按如下方式解压您的 zip 文件:

7z e file.zip

如果您的 zip 存档有 88,000 个文件并且您正在处理 ~10Gig 的内容,您将需要一个支持 zip64 扩展的解压缩程序。

您可以检查您的解压程序是否支持 zip64 像这样

$ unzip -v | grep -i zip64
        ZIP64_SUPPORT (archives using Zip64 for large files supported)

如果没有ZIP64_SUPPORT,那你就倒霉了。我怀疑你的解压不支持 zip64.

替代方案是获取支持 zip64 的解压缩版本或使用替代程序,例如 z-zip.

您的整个文件很可能没有压缩,您过早地移动了它。至少那是我的问题。