我将一些 zip 文件压缩到另一个 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.
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
该zip工具提供--fix(或-F) 选项来尝试修复损坏的 zip 文件。对于严重损坏的档案,可以选择-FF。因此,您可以使用如下命令从损坏的 zip 文件中恢复数据(参考):
zip -FF corrupted.zip --out new.zip
Run Code Online (Sandbox Code Playgroud)
只能恢复未损坏的文件:某些文件可能会丢失。