Unzipping Huge Files from the Command Line

Lucky me. I have 7GB zip which has about 8K files in it, across 160 odd folders. Unzipped it’s about 32GB of data. Whatever zipped it used 64 bit extensions to enable it to be that massive. 

So can’t be unzipped by the standard *nix unzip which doesn’t do use 64 extensions (AFAIK). The Windows 7 compact -u command borks completely (and unhelpfully). I’ve had a look at winrar, command line doesn’t like zips, and all the usual suspects for handling zips in Windows. None are really simple, available, and just, well, THERE, when I need them. What I need is something simple that’s on just about everything I use and doesn’t mutter “shareware” or “trial version” at me and I can use in a bash one liner.

Step forward java. The jar utility uses zip compression as part of it’s packaging, and can unzip zip files for you. It also uses whatever extensions necessary to get at those pesky enormous zip files that no-one ever expected anyone to be able to use.

On windows:

C:\tmp> "<path to your jdk>\bin\jar" xf humongouszipfile.zip

On bash:

jar xf humongousZipFile.zip

Ta-da. It ain’t quick but it works.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s