OS Manuals

/usr/bin/unzip

Extract PKZIP-compatible .zip files

From unzip 6.0-r8 (os), captured 2026-11-05 by running unzip --help (exit 0). permalink

UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
  Default action is to extract files in list, except those in xlist, to exdir;
  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment only
  -v  list verbosely/show version info       -T  timestamp archive to latest
  -x  exclude files that follow (in xlist)   -d  extract files into exdir
modifiers:
  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)
  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files
  -j  junk paths (do not make directories)   -aa treat ALL files as text
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
See "unzip -hh" or unzip.txt for more help.  Examples:
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
Options (18)
OptionDescriptionSource
-pextract files to pipe, no messages -l list files (short format)help + man
-ffreshen existing files, i.e., extract only those files that already exist on disk and that are newer than the disk copies.help + man
-uupdate files, create if necessary -z display archive comment onlyhelp + man
-vlist archive files (verbose format) or show diagnostic version info.help + man
-xexclude files that follow (in xlist) -d extract files into exdirhelp
-nnever overwrite existing files -q quiet mode (-qq => quieter)help
-ooverwrite files WITHOUT prompting -a auto-convert any text fileshelp
-jjunk paths (do not make directories) -aa treat ALL files as texthelp
-Cmatch filenames case-insensitively -L make (some) names lowercasehelp
-Xrestore UID/GID info -V retain VMS version numbershelp
-Kkeep setuid/setgid/tacky permissions -M pipe through "more" pagerhelp
-Zzipinfo(1L) mode. (in the manual page but not in --help)man
-A[OS/2, Unix DLL] print extended help for the DLL's programming interface (API). (in the manual page but not in --help)man
-cextract files to stdout/screen (CRT''). (in the manual page but not in --help)man
-llist archive files (short format). (in the manual page but not in --help)man
-ttest archive files. (in the manual page but not in --help)man
-T[most OSes] set the timestamp on the archive(s) to that of the newest file in each one. (in the manual page but not in --help)man
-zdisplay only the archive comment. (in the manual page but not in --help)man
Exit status (17) from the manual page
0normal;
1one or more warning errors were encountered, but processing completed successfully anyway.
2a generic error in the zipfile format was detected.
3a severe error in the zipfile format was detected.
4unzip was unable to allocate memory for one or more buffers during program initialization.
5unzip was unable to allocate memory or unable to obtain a tty to read the decryption password(s).
6unzip was unable to allocate memory during decompression to disk.
7unzip was unable to allocate memory during in-memory decompression.
8[currently not used]
9the specified zipfiles were not found.
10invalid options were specified on the command line.
11no matching files were found.
50the disk is (or was) full during extraction.
51the end of the ZIP archive was encountered prematurely.
80the user aborted unzip prematurely with control-C (or similar)
81testing or extraction of one or more files failed due to unsupported compression methods or unsupported decryption.
82no files were found due to bad decryption password(s).
Examples (17) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.