Unzipping Large ZIP Archives on Mac (like latest Microsoft Edge VM)

TL;DR: Use `ditto` instead of `unzip` for large zip archives.

Today I downloaded the Microsoft Edge on Win10 VM from Microsoft. It downloads as either a single 5.42 GB `.zip` file, or as size separate smaller `.zip` file segments that you can then join together. I initially downloaded the smaller segments, verified their MD5 hashes, and tried to unzip the combined file by double-clicking on it. But, this just resulted in a `.cpgz` file! So, after some web searching, I decided to try `unzip` from the command line. This failed as well, but at least gave me an error message:

$ unzip Microsoft\ Edge.Win10.For.Mac.VirtualBox.zip
Archive:  Microsoft Edge.Win10.For.Mac.VirtualBox.zip
warning [Microsoft Edge.Win10.For.Mac.VirtualBox.zip]:  1121740098 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [Microsoft Edge.Win10.For.Mac.VirtualBox.zip]:  start of central directory not found;
  zipfile corrupt.
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

I even tried downloading the single 5.42 GB `.zip` file, thinking that perhaps something was going wrong when I combined the smaller segments. No dice.

I started thinking that perhaps the `.zip` file was too large for `unzip`, so I searched some more and found a post on Stack Overflow suggesting to try the `ditto` command line tool. Bingo! Now I was in business:

$ ditto -x -k Microsoft\ Edge.Win10.For.Mac.VirtualBox.zip edge

I was able to successfully unzip the file and import the VM into VirtualBox.

4 thoughts on “Unzipping Large ZIP Archives on Mac (like latest Microsoft Edge VM)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s