Bootstrap FreeKB - Linux Commands - Resolve "End of central directory signature not found"
Linux Commands - Resolve "End of central directory signature not found"

Updated:   |  Linux Commands articles

Let's say you get the following when attempting to unzip a file on Linux using the unzip command.

Archive:  example.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.
note:  example.zip may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of example.zip or
        example.zip.zip, and cannot find example.zip.ZIP, period.

 

The file command can be used to ensure the file is a zipped file. In this example, the file command confirms that example.zip is a zip file.

~]# file example.zip
example.zip: Zip archive data, at least v1.0 to extract

 

Typically, a zip file is downloaded from some website. If the MD5 or SHA256 checksum of the file was provided, the md5sum command or sha256sum commands can be used to ensure the checksum of the file on your Linux system is an exact match of the provided MD5 or SHA256 sum. If the checksum does not match, either the zip file was corrupted while being downloaded, or changed after it was downloaded. In either case, you can try to download the zip file again.

~]# sha256sum example.zip
0fdff08c4a715dc19197b37cfe19ba3439bc28ba48f536129584900b579afd33   example.zip

 

If for some reason you cannot redownload the zip file, the zip command with the -F or --fix flag can be used to try to repair the zip file.

zip --fix example.zip --out example_repaired.zip

 

Or with the -FF or --fixfix flag.

zip --fixfix example.zip --out example_repaired.zip

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 4ebb65 in the box below so that we can be sure you are a human.