EN
Linux - unpack zip file
15 points
In this short article, we would like to show how to unpack files from *.zip
file using unzip
under Linux.
Quick solution:
xxxxxxxxxx
1
unzip file.zip
2
3
# or:
4
5
unzip /path/to/file.zip
Where:
file.zip
or/path/to/file.zip
should be replaced with a desired zip file path.
Note: by default files will be extracted to the current working directory - check the below usage variants to see how to change output directory path (
-d
parameter).
In this section, you will see the most common unzip
usage cases.
1. Unpack files into the indicated directory xxxxxxxxxx 1 unzip file.zip -d ./output 2 3 # or 4 5 unzip /path/to/file.zip -d /path/to/output Where:
|
2. Suppress unpacking messages xxxxxxxxxx 1 unzip -q file.zip 2 3 # or: 4 5 unzip -q /path/to/file.zip Where:
|
3. Use zip archive password xxxxxxxxxx 1 unzip -P "zip_file_password" file.zip 2 3 # or: 4 5 unzip -P "zip_file_password" /path/to/file.zip Where:
|
4. Overwrite existing files without prompting xxxxxxxxxx 1 unzip -o file.zip 2 3 # or: 4 5 unzip -o /path/to/file.zip Where:
|
To install under Debian/Ubuntu-based Linux it is necessary to use the following command:
xxxxxxxxxx
1
sudo apt-get install unzip