Tag Archives: unzip

Unzip the password protected zip file on the Mac with the unzip command, and the error unsupported compression method 99 is reported

    Problem: when unzip is used to unzip the password protected zip file on the Mac, the error unsupported compression method 99

    Solution: Mac’s own decompression tool cannot decrypt encrypted files. Do not install a 7zip software,

    On Ubuntu, apt install p7zip

    Brew install p7zip on MAC

    Then use the command 7z x file.zip

Unzip decompression failed (cannot find zipfile directory)

Link to this article: https://blog.csdn.net/yori_ chen/article/details/80493383
[ root@localhost soft]# unzip QY.zip
Archive: QY.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 QY.zip or
QY.zip.zip, and cannot find QY.zip.ZIP, Period.
1
2
3
4
5
6
7
8
at the beginning, I thought it was the loss of some information in the compressed package file, which led to the decompression error. No, how could it go wrong?Emmmm, or I felt something was wrong, so Google gave the following:

Generally, zip files are decompressed under Linux, and the system default extract here is used to decompress them (unzip is used by default)
if the compressed file. Zip is larger than 2G, unzip cannot be used. This is because the file offset represented by long type data in C library can only be 2G on 32-bit computers
so if you want to decompress a large file, You can use 7zip to unzip
install 7zip
official website address: http://www.7-zip.org/download.html
Software download address: https://sourceforge.net/projects/p7zip/files/p7zip/

Here, we use version 16.02 to install, linux environment

wget https://jaist.dl.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_ 16.02_ src_ all.tar.bz2
tar -jxvf p7zip_ 16.02_ src_ all.tar.bz2
cd p7zip_ 16.02
make && amp; Make install
1
2
3
4
if you are prompted to install G + + when executing the make command, please execute Yum install gcc-c++

Tar (child): bzip2: cannot exec: no such file or directory appears, please install Yum install bzip2 – Y

The installation is completed when the following information appears

./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip
– installing /usr/local/bin/7za
– installing /usr/local/man/man1/7z.1
– installing /usr/local/man/man1/7za.1
– installing /usr/local/man/man1/7zr.1
– installing /usr/local/share/doc/p7zip/README
– installing /usr/local/share/doc/p7zip/C hangeLog
– installing HTML help in /usr/local/share/doc/p7zip/DOC

1
2
3
4
5
6
7
8
9
use of 7z command
decompress 7z file
7za x test. Zip – R – O./
1
parameter meaning:

X stands for decompressed files, which are decompressed according to the original directory tree (another parameter E is also decompressed files, but it will decompress all files to the root instead of its original folder)
test.zip is the compressed file in the current directory, which is used as the test file here
– R means recursively decompressing all subfolders
– O is the specified directory to decompress to, -After o, there is no space, and the directory (- O./is the current directory)
compressed file/folder
7za a – t7z – R test.7z/opt/test/*
1
parameter meaning:

A means to add a file/folder to the compressed package
– t is to specify the compression type, here it is set as 7z, but not specified, because the default compression type of 7za is 7z
– R means to recurse all the subfolders
test.7z is the compressed package name
/opt/test/* is the compressed directory
note: 7za supports not only. 7z compression format, but also. Zip., tar . bz2 and other compression types