27

I have three files 1.zip, 1.z01 1.z02. I would like to extract and join them into a file, by right clicking 1.zip and selecting "Extract Here". But then there comes an error:

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

I was wondering what the problem it is and how I can solve it?

Thanks and regards!


ADDED: Is my usage of "unzip -FF" wrong? It seems not work:

$ 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

Thanks again!

2nd ADDED: Still ain't right.

$ 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)

It generated 1.wmv, which can play well only until midway in Gnome Mplayer.

3rd ADDED: Am I using 7z wrongly:

$ 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
13

I have the same issue today with Mass Effect 3. Someone broke the installation of Mass Effect 3 in new version of origin on windows and my wine of course too (installation hangs on 99%). I have to make manually installation:

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 should be applied to last part of archive, it will automatically check for all parts

| improve this answer | |
29

Try:

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

I think most likely some data is broken many times so you need the -FF still in unzip. A single -F may work also though.

| improve this answer | |
  • How to do this on Windows? – Danijel Dec 16 '14 at 16:29
  • 1
    do we need -FF for unzip? – shabunc Jun 10 '15 at 23:30
6

Put all your zip files in the same directory: zip_file.z01, zip_file.z02, zip_file.z03, ..., zip_file.zip

In Zip 3.0 version the following commands worked for me:

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

As noted in the comments, using a - sign after the command line option -s joins all the zip files together and writes it as a single zip file which you can then extract using the unzip command.

| improve this answer | |
  • 3
    This worked perfectly. Maybe you should add that "-s" parameter is to split into several file, but if size provided is 0 or negative (in your case you provide a "-"), then instead of splitting, joins toguether all the files. – AwkMan May 8 '18 at 15:34
  • Thanks a lot @AwkMan :) Done! – kmario23 Nov 16 '19 at 14:12
3

I also had some issues. man unzip said the following:

Also, zip 3.0 and later can combine multi-part (split) archives into a combined single-file archive using ``zip -s- inarchive -O outarchive''.

This (zip -s- vmdkdisk -O combined) seems to work for me... (combine vmdkdisk.z01 and vmdkdisk.zip into one file combined.zip)

| improve this answer | |
2

According to reading man zip, "Split .zip" archives can be recombined and unpacked using unzip -FF.

| improve this answer | |
  • Thanks! But it seems not working. See my update to my post. Thanks! – Tim Mar 21 '11 at 5:23
  • cat 1.z01 1.z02 1.zip > combined.zip && unzip -FF combined.zip ? – sladen Mar 21 '11 at 5:46
  • Thanks! It now generates 1.wmv, but there is some error. – Tim Mar 21 '11 at 5:58
  • Does running 7z (7-Zip) on the first .z01 file work? – sladen Mar 21 '11 at 6:11
  • Still no. "Error: Can not open file as archive". See my update. – Tim Mar 21 '11 at 6:25
1

Above solution by kmario23 is correct I see some typo errors. Here is another example.

    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
| improve this answer | |
  • 1
    You might just edit his answer... – wittich Jun 7 '16 at 7:31
0

Go to the directory where the archives are, through terminal.

If they are on desktop, command is:

cd ~/Desktop

~ is your home folder name. Create full archive, by using this command:

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

Full archive is now created.
Unpack the full archive, by using this command:

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

It appears 7zip doesn't support multi-volume ZIP archives.

Igor Pavlov states it in this forum thread

| improve this answer | |
0

Keep in mind that if your follow up files (01, 02 etc.. ) are created by Windows (Z01, Z02 etc..) your linux will not find them. You need to rename the files to z01, z02 ..

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.