Compression
unzip
Extract files from a ZIP archive.
Synopsis
syntax
unzip [OPTION]... FILE[.zip] [LIST] [-d DIR]
Examples
Extract to current directory
unzip archive.zip
Extract to specific directory
unzip archive.zip -d /opt/app
List contents without extracting
unzip -l archive.zip
Extract and overwrite existing files
unzip -o update.zip
Common options
| Flag | Description |
|---|---|
| -l | List archive contents |
| -d | Extract to directory |
| -o | Overwrite without prompting |
| -n | Never overwrite existing files |
| -q | Quiet operation |
About unzip
The `unzip` command extract files from a ZIP archive. Compression commands reduce file sizes for storage and transfer.
Linux supports multiple compression formats, each with different speed and ratio trade-offs. Understanding these tools is essential for working with archives, backups, log rotation, and software distribution packages.
The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man unzip`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Compression Commands
Other commands in the Compression category