man.lsPlain-English help for Unix commands

unzip Extract files from a zip archive

Opens .zip archives: it can list what is inside, test that the file is intact, and extract it. By default it unpacks into the current directory, so choose a destination with -d. Use zip to create archives.

Synopsis

unzip [-l | -t] archive.zip
unzip [OPTION]... archive.zip [file ...] [-x file ...] [-d directory]

Common options

Option or formWhat it does
-lList the files in the archive (names, sizes and dates) without extracting
-d directoryExtract into this directory, creating it if needed, instead of the current directory
-tTest the archive for errors without extracting
-nNever overwrite existing files. Skip them without asking
-oOverwrite existing files without asking. Dangerous, use with care
-qQuiet: print less. Use -qq for even less
-jJunk paths: put every file in one folder, ignoring the folders stored in the archive
-x listExtract everything except the files that follow. Place it after the file list

Examples

List an archive's contents
zip -rq docs.zip docs && unzip -l docs.zip
Extract into a chosen folder
zip -rq docs.zip docs && unzip -q docs.zip -d restore && ls restore
docs
Test an archive without extracting it
zip -rq docs.zip docs && unzip -tq docs.zip
Extract only one file
zip -rq docs.zip docs && unzip -q docs.zip docs/readme.md -d out && ls out/docs
readme.md
Print one file to the screen without extracting
zip -rq docs.zip docs && unzip -p docs.zip docs/readme.md
Extract everything except one folder
zip -rq docs.zip docs && unzip -q docs.zip -x 'docs/old/*' -d out && ls -R out

Notes

See also

Last reviewed 2026-10-07.