Jar works magically when Unzip Fails

Has it happened to you? You download a zip file from Internet and after it is done downloading, when you try to unzip it, you get a weird error. I have a tiny trick up my sleeve, when unzip fails.


$ unzip ABC.zip
Archive:  ABC.zip
End-of-central-directory signature not found.  Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive.  In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ABC.zip or
ABC.zip.zip.zip, and cannot find ABC.zip.zip.ZIP, period.


If it happens to you then without thinking further, use jar. It works excellently.

jar xvf ABC.zip

If you cannot find jar in your PC you can alternatively use fastjar too.

apt-get install fastjar

Leave a Reply

Your email address will not be published. Required fields are marked *