6

I am unzipping a file with approximately 3 million single text files - the zip-file itself is around 12 GB in size. It's not multi-part - it's just one large zip file btw. I do not have the original data - all I have is the zipped file which means I cannot try to zip the content again (just so you know).

The problem is that as I unzip, at some point, I get

..
file #1207565:  bad zipfile offset (local header sig):  9570252890
file #1207566:  bad zipfile offset (local header sig):  9570254437
file #1207567:  bad zipfile offset (local header sig):  9570255044
file #1207568:  bad zipfile offset (local header sig):  9570256141
file #1207569:  bad zipfile offset (local header sig):  9570256786
file #1207570:  bad zipfile offset (local header sig):  9570257539
..

This does not seem to affect every subfolder or file respectively in the archive but for a lot of them the process seems to fail.

At this point it's hard for me to guess if the packing or the unpacking is the problem

Are there any workarounds I could try on my side?

  • 3
    Suggestion online and via man pages is to use: zip -F original.zip --out fixed.zip and then try to extract fixed.zip as normal... – andrew.46 Apr 17 '18 at 9:10
  • @andrew.46 On it - although I had to "try harder" using -FF in order to make it run at all - what I can see though are warning and things like "skipping this signature .." - I guess that means those files are not going to make it into fixed.zip? – displayname Apr 17 '18 at 10:22
  • @andrew.46 Okay, I tried it twice - unfortunately this does not work. It ends up with the same error messages. :/ – displayname Apr 17 '18 at 10:28
2

I ran into the same problem - a huge zip file with a lot of files - and unzip choked trying to unpack it. A possible solution is to use java archiver. Just unpack your stuff with jar xvf file.zip

0

I just wanted to copy the comment into an answer, although I had to use the "try harder" -FF option to get it to work:

Suggestion online and via man pages is to use: zip -F original.zip --out fixed.zip and then try to extract fixed.zip as normal...

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.