On Linux systems, use the following steps to unzip a password-protected ZIP file: Install the unzip command. Use the unzip -P
command, where is the password of the ZIP file. Enter the correct password. If the password is correct, the unzip command will unzip the contents of the ZIP file to the current directory.
How to decompress a password-protected ZIP file in Linux
In a Linux system, you can use the following steps to decompress it ZIP file with password:
Step 1: Install the unzip command
If the unzip command is not installed, please use the following command to install it:
<code>sudo apt-get install unzip</code>
Step 2: Unzip using the -P option
The unzip command includes a -P option to specify the password for the ZIP file. To unzip a file with a password, use the following syntax:
<code>unzip -P <密码> <ZIP 文件名></code>
For example, to unzip a file named "myzip.zip" with the password "mypassword", use the following command:
<code>unzip -P mypassword myzip.zip</code>
Step 3: Enter your password
The system will prompt you to enter your password. Enter the correct password and press Enter.
Step 4: Unzip the file
If the password is correct, the unzip command will unzip the contents of the ZIP file to the current directory.
Tip:
The above is the detailed content of How to decompress zip with password in linux. For more information, please follow other related articles on the PHP Chinese website!