Macos – How to unzip split files on OS X

macoszip

How do I unzip a split zip file?

In Terminal, I wrote: unzip filename.zip and it did not unzip this file.

Terminal wrote:

$ unzip filename.zip
Archive:  filename.zip
warning [filename.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):  98
file #3:  bad zipfile offset (local header sig):  471
file #4:  bad zipfile offset (local header sig):  6635222

Double clicking of this file creating filename.zip.cpgz

What can I do?

Best Answer

This was the straight forward and only solution that worked for me on OS X (taken from here).

1. To create a split zip archive (a series of files named zip, z01, z02...), run following command in Terminal:

zip -s 100m -x "*.DS_Store" -r split-foo.zip foo/

2. To extract a split zip archive (a series of files named zip, z01, z02...), run following command in Terminal:

First, combine the split archive to a single archive:

zip -s 0 split-foo.zip --out unsplit-foo.zip

Extract the single archive using unzip:

unzip unsplit-foo.zip