unzip [-e] [-x] [-l] [-o] [-d directory] <file name>.zip
The unzip command is a decompression utility that enables you to extract files in a .zip file. The unzip command supports the following options:
Option | Description |
---|---|
-e |
Extracts files in a .zip file to the current working directory. Note: While extracting the files this option does not use the folder structure defined in the .zip file |
-x |
Extracts files in a .zip file to the current working directory. Note: While extracting the files this option uses the folder structure defined in the .zip file |
-l |
Lists the files contained in a .zip file. |
-o |
This option enables you to overwrite files without prompting while you extract files from a .zip file. |
-d directory |
This option enables you to specify the directory to which you want the files to be extracted. |
unzip master.zip
This example decompresses the files in the master.zip file.
unzip –o master.zip
This example decompresses the files in the master.zip file and overwrites existing files.
unzip –l master.zip
This example lists the files in the master.zip file.