解壓縮被分成 2 個檔案的存檔

解壓縮被分成 2 個檔案的存檔

我有 2 個 zip 文件,它們是使用以下方法分割的:

zip -r -s 15 my_file.zip my_file.pdf

現在我有2個文件:

  • my_file.zip
  • my_file.z01

我怎樣才能解壓它們?

我得到unzip my_file.zip

Archive: my_file.zip
waring (my_file.zip) zipfile claims to be last disk of a multi-part archive;
  attempting to process anyway, assuming all parts have been concatenated
  together in order.  Expect "errors" and warnings...true multi-part support
  doesn't exist yet (coming soon).
file #1:  bad zipfile offset (local header sig):  4

答案1

zip 不支援解壓縮分割檔(奇怪的是),所以首先你必須在接收端「修復」它們。

zip -F my_file.zip --out unsplit.zip

這將從分割存檔中獲取所有文件,並將它們複製到一個名為(或任何您想要的名稱)my_file.z*的新 zip 中。unsplit.zip

然後您可以正常解壓縮該檔案。

相關內容