如何提取和连接文件 xxx.zip, xxx.z01 和 xxx.z02

分享于 

6分钟阅读

ubuntu

  繁體

问题

我有三个文件1.zip,1.z01 1.z02,出现了一个错误:

7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30 p7zip Version 9.04 (locale=en_US.utf8,Utf16=on,HugeFiles=on,2 CPUs )

Error : /home/tim/Desktop/1. zip : can not open file as archive

Errors : 1

想知道问题是什么,如何解决?

"unzip -FF"用法错误?不能工作:


$ unzip -FF 1.zip 


Archive: 1.zip


warning [1.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): 0



第二:还是不对。


$ cat 1.z01 1.z02 1.zip > combined.zip && unzip -FF combined.zip


Archive: combined.zip


warning [combined.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).


warning [combined.zip]: 209829313 extra bytes at beginning or within zipfile


 (attempting to process anyway)


file #1: bad zipfile offset (local header sig): 209829313


 (attempting to re-compensate)


 extracting: 1.wmv bad CRC ee181eef (should be f3c61875)



它生成了1.wmv,只能在Gnome Mplayer中途播放。

第三:我错误地使用了7z:


$ 7z e 1.z01



7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30 p7zip Version 9.04 (locale=en_US.utf8,Utf16=on,HugeFiles=on,2 CPUs)



Processing archive: 1.z01



Error: Can not open file as archive



$ 7z e 1.zip



7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30 p7zip Version 9.04 (locale=en_US.utf8,Utf16=on,HugeFiles=on,2 CPUs)



Processing archive: 1.zip



Error: Can not open file as archive




答案1

必须手动安装:


cp /mnt/cdrom1/Mass Effect 3.z01 ~/temp/Mass Effect 3.z01


cp /mnt/cdrom2/Mass Effect 3.zip ~/temp/Mass Effect 3.zip


zip -FF Mass Effect 3.zip --out Mass Effect 3.zip.fixed


mkdir Mass Effect 3


unzip -d Mass Effect 3/ Mass Effect 3.zip.fixed


du --total Mass Effect 3


>> 10466048 (~10.5 GB => success)



zip -FF应该应用于存档的最后一部分,它会自动检查所有部分


答案2

尝试以下方法:


zip -FF 1.zip --out 1-full.zip


unzip -FF 1-full.zip



单个-F也可以工作。


答案3

man unzip:

另外,zip 3.0及更高版本可以使用``zip -s- inarchive -O outarchive ''将多部分(拆分)的存档合并为一个合并的单文件存档。


答案4

根据读取man zip,可以使用unzip -FF重新组合和解包"拆分.zip"归档文件。


答案5

放置所有文件file.z01,file.z02,file.z03,同一目录中的file.zip。

在Zip 3.0版本中,以下命令对我有用:


$ zip -s- zip_file.zip -O zip_file_full.zip


$ unzip zip_file_full.zip




答案6

如果它们在桌面上,命令为:

 
cd ~/Desktop



~是你的主文件夹名,使用以下命令创建完整的归档文件:


zip -F (name of last part of archive, which will end with .zip, not .z0X) --out (desired output name of compiled archive, if has spaces put" marks around the name).zip



已创建完整归档,使用以下命令解压缩整个归档文件:


unzip (full archive name, with" marks around it if has spaces).zip -d (destination folder directory, see first step)




答案7

看来7zip不支持多卷ZIP存档。


答案8

下面是另一个示例。


 pramodimac:SDK pramod$ pwd


 /Users/pramod/Downloads/SDK


 pramodimac:SDK pramod$ ls -ltrh


 total 150104


 -rw-r--r--@ 1 pramod staff 1.3M Jun 3 11:56 SDK.zip


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z03


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z04


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z01


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z02


 pramodimac:SDK pramod$ zip -s 0 SDK.zip --out single.zip


 pramodimac:SDK pramod$ ls -ltrh


 total 300208


 -rw-r--r--@ 1 pramod staff 1.3M Jun 3 11:56 SDK.zip


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z03


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z04


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z01


 -rw-r--r--@ 1 pramod staff 18M Jun 3 11:58 SDK.z02


 -rw-r--r-- 1 pramod staff 73M Jun 6 22:26 single.zip


 pramodimac:SDK pramod$ unzip single.zip





文件  ext  files  Extra  提取  ZIP  
相关文章