Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux unzip command

List or extract ZIP contents. Inspect untrusted archives before extraction.

Info-ZIP

Syntax

Command form
unzip [OPTION]... ARCHIVE.zip [FILE...] [-d DIRECTORY]

Common options

7 options
OptionWhat it does
-lList archive contents without extracting.
-tTest archive integrity.
-oOverwrite existing files without prompting.
-nNever overwrite existing files.
-jDiscard directory paths and extract into one directory.
-d DIRExtract files into DIR.
-ZRun zipinfo mode for archive listing options.

Usage examples

2 examples

List or extract ZIP contents. Inspect untrusted archives before extraction.

unzip -l site-backup.zip

Extract without replacing existing files.

unzip -n site-backup.zip -d ./restore

Notes

Inspect untrusted archives before extracting. Paths and symlinks in archives can create unexpected files; prefer a new empty destination directory.