无法使用 ubuntu 终端解压文件

无法使用 ubuntu 终端解压文件

我收到以下错误消息。zip 文件(5GB)可能太大

Archive:  /home/wing92518/Documents/simulation_set_1_result/replication_1.zip
warning [/home/wing92518/Documents/simulation_set_1_result/replication_1.zip]:  849850736 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [/home/wing92518/Documents/simulation_set_1_result/replication_1.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)

答案1

由于您的 zip 文件似乎已损坏(zipfile corrupt),您可以尝试修复该文件,然后解压已修复的文件:

zip -FF corrupt.zip --out repaired.zip
unzip repaired.zip  

请注意,损坏的部分可能会丢失。

来自解压缩手册:

-FF
   --fixfix
          Fix the zip archive. The -F option can be used if some portions of the archive are missing, but requires a reasonably intact central directory.  The input archive is scanned as usual, but zip
          will ignore some problems.  The resulting archive should be valid, but any inconsistent entries will be left out.

          When  doubled  as  in -FF, the archive is scanned from the beginning and zip scans for special signatures to identify the limits between the archive members. The single -F is more reliable if
          the archive is not too much damaged, so try this option first.

通过

相关内容