Unzipping the multipart file - bad zipfile offset (local header sig): 4

18,362

Solution 1

The cat-based solution didn't work for me, but merging the files using zip -F file.zip --out file-large.zip and then unzip file-large.zip did work.

Solution 2

You could try

cat test.z* > hugetest.zip
unzip hugetest.zip
Share:
18,362
mightyteja
Author by

mightyteja

DARING AND DASHING !!

Updated on June 11, 2022

Comments

  • mightyteja
    mightyteja almost 2 years

    I have a file with 13 GB, which has been split equally using martipart feature in the Winzip(Windows 7).

    I uploaded the files to the Linux server and I am trying to combine the multipart file to single file. But I am running through the following error.

    Files after being split,

      total 9646432
      -rw-r--r-- 1 root root 730000000 Apr 14 20:57 file.z01
      -rw-r--r-- 1 root root 730000000 Apr 14 20:07 file.z02
      -rw-r--r-- 1 root root 730000000 Apr 14 20:01 file.z03
      -rw-r--r-- 1 root root 730000000 Apr 14 16:30 file.z04
      -rw-r--r-- 1 root root 730000000 Apr 14 16:24 file.z05
      -rw-r--r-- 1 root root 730000000 Apr 14 16:14 file.z06
      -rw-r--r-- 1 root root 730000000 Apr 14 16:08 file.z07
      -rw-r--r-- 1 root root 730000000 Apr 14 15:51 file.z08
      -rw-r--r-- 1 root root 730000000 Apr 14 15:46 file.z09
      -rw-r--r-- 1 root root 730000000 Apr 14 15:32 file.z10
      -rw-r--r-- 1 root root 730000000 Apr 14 15:27 file.z11
      -rw-r--r-- 1 root root 730000000 Apr 14 15:20 file.z12
      -rw-r--r-- 1 root root 730000000 Apr 14 14:28 file.z13
      -rw-r--r-- 1 root root 349166077 Apr 14 21:00 file.zip
    

    Command in server,

     #zip file.zip
    

    I am running into the error,

    Archive:  file.zip
    warning [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
    

    I have tested the same for test file with 27MB ,

     #ls
    test.z01  test.z02  test.z03  test.z04  test.z05  test.zip
    
    
     [tbabu@fgtd-301705-130558-app001 .tbabu]$ unzip test.zip
    Archive:  test.zip
    warning [test.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
    file #2:  bad zipfile offset (local header sig):  207105
    file #3:  bad zipfile offset (local header sig):  209345
    ..
    ..
    file #302:  bad zipfile offset (lseek):  2924544
    file #303:  bad zipfile offset (lseek):  2940928
    ..
    ..
    ..
    inflating: en_US/1/2.zip
    ..
    ..
    ..
    

    I am able to combine the files in the test eventhough I get above message.

    Why is not working with the 13Gb file??

    Assistance would be much appreciated.

  • Pierre-Antoine
    Pierre-Antoine about 5 years
    Same here: the cat solution lead to some files not being unzipped. This solution worked.