1

I used right click then compress to zip the folder called m1 and got m1.zip folder but when I tried to extract it again I got.

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

2 Answers 2

2

The issue is precisely as stated. Unzip is unable to locate the line of code that indicates the end of the archive, thus either:

  1. The archive has been corrupted.

  2. It is not a.zip file.

You can try this solution :-

jar xvf m1.zip

steps:

  1. drag and drop file into terminal window.
  2. use keyboard arrows to navigate to start of line in terminal
  3. type jar xvf in front of your file name, remembering to leave space before the start of your file name.
  4. grab a beer and watch terminal work its magic as it extracts files.

The position of where new files go vary, but the simplest way to locate them is to click on your computer's name in Finder, which should display the most recent activity at the top of all files.

You can refer this.

If the jar command is not available, you can install fastjar by pasting the following in terminal:

sudo apt-get install fastjar
5
  • 1
    i tried also this solution but got some of the files not all of them. and i tried also zip -FF m1.zip --out new.zip to fix the zip file and found that it can read all the files in the zip file but got the same problem in extracting it
    – sam
    Apr 3, 2022 at 9:31
  • I think you should reinstall jar ! Apr 3, 2022 at 9:34
  • excuse me how can i reinstall jar ?
    – sam
    Apr 3, 2022 at 9:53
  • Sorry for that, I haven't tried this ! One more thing you can use another third party zip applications ! Apr 3, 2022 at 10:05
  • thanks but like what please ? and if i want specific file form this zip file without extraction , can i do this or will be a problem
    – sam
    Apr 3, 2022 at 10:14
0

I encountered a similar issue before, and I found a workaround that might help. Here's what I did:

First, I suspected that the file might not actually be a ZIP archive, but perhaps a gzipped file incorrectly named with a .zip extension. I used the gzip command to decompress the file:

gzip m1.zip

This command converted the file into a gzipped archive (m1.zip.gz). Then, I extracted the gzipped archive using the tar command:

tar -xvzf m1.zip.gz #dont use unzip or gunzip as it return same zip file

This step successfully extracted the contents of the archive. Additionally, during the extraction process, I noticed that a md5sum.txt file was generated. This file contained MD5 checksums for the extracted files.

md5sum extracted_file.gz #lynux
md5 extracted_file.gz #macos

I matched the output of this command with the checksums provided in md5sum.txt. If they matched, it indicated that the file wasn't corrupted. Also integrity of the original zipfile can be tested using the -t option with unzip command:

unzip -t m1.zip

This command tests the integrity of the zipfile. If it passes without errors, it's another indication that the file is not corrupted. This approach helped me successfully extract the files from a potentially corrupted archive. I hope it helps you too!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .