Issue with zip

I am back here after long time!

Need help of experts!

I am trying to unzip a zip file. I tried with unzip and got the below error

#unzip -p ConfigMigrationUtility.zip
[ConfigMigrationUtility.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.

Again I tried with gunzip and got the below error

gunzip -v CmuV6Compatibility.zip
gunzip: CmuV6Compatibility.zip: unknown suffix � ignored

where I am going wrong?

There is a difference between zip/unzip and gzip/gunzip . If gzip complains about the extension, try renaming it to ConfigMigrationUtility.gz .
If it still complains, either the first message from zip/unzip might be correct, or the archive is in a different format or broken.

You can gunzip an archive created with zip, but not vice versa.

zaxxon's advice is correct if for some reason it is a file compressed using gzip, but it was named with a ".zip" extension. However, it is worth mentioning that the error you encountered may also be because the file was corrupted in some way. ZIP and GZIP are binary formats, so if that file was transferred at some point using a non-binary protocol, it may have corrupted the data. Also, to determine if it is ZIP or GZIP, you can look at the first few bytes of the file.

Zip file header:

od -h file.gz |head
0000000 8b1f ...

Gzip file header:

od -h file.zip|head
0000000 4b50 0403 ...

Just rename the file with .gz extension and then try to

gunzip

the file. It will solve the issue.

To determine the correct type, you can use the command "file"
This is slightly easier than memorising Octal Dump sequences.

If it is in fact a ZIP (and not GZIP), you can check out these patches:
119254-75 (SPARC)
119255-75 (x86)

These resolve an issue where /usr/bin/unzip has trouble coping with files above 2 Gb. This problem gives the same kind of errors.

cheers,
Pete