OS Manuals

/usr/bin/zip

Creates PKZIP-compatible .zip files

From zip 3.0-r11 (os), captured 2026-11-05 by running zip --help (exit 0). permalink

Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0 (July 5th 2008). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
  The default action is to add or replace zipfile entries from list, which
  can include the special name - to compress standard input.
  If zipfile and list are omitted, zip compresses stdin to stdout.
  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete OS files)
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  -@   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -y   store symbolic links as the link instead of the referenced file
  -e   encrypt                      -n   don't compress these suffixes
  -h2  show more help
Options (155)
OptionDescriptionSource
-ffreshen: only changed files -u update: only changed or new fileshelp + man
-ddelete entries in zipfile -m move into zipfile (delete OS files)help + man
-rrecurse into directories -j junk (don't record) directory nameshelp + man
-0store only -l convert LF to CR LF (-ll CR LF to LF)help
-1compress faster -9 compress betterhelp
-qquiet operation -v verbose operation/print version infohelp + man
-cadd one-line comments -z add zipfile commenthelp + man
-@read names from stdin -o make zipfile as old as latest entryhelp + man
-xexclude the following names -i include only the following nameshelp
-Ffix zipfile (-FF try harder) -D do not add directory entrieshelp + man
-Aadjust self-extracting exe -J junk zipfile prefix (unzipsfx)help + man
-Ttest zipfile integrity -X eXclude eXtra file attributeshelp + man
-ystore symbolic links as the link instead of the referenced filehelp + man
-eencrypt -n don't compress these suffixeshelp + man
-h2show more helphelp + man
-a (in the manual page but not in --help)man
--ascii[Systems using EBCDIC] Translate file to ASCII format. (in the manual page but not in --help)man
--adjust-sfxAdjust self-extracting executable archive. (in the manual page but not in --help)man
-AC (in the manual page but not in --help)man
--archive-clear[WIN32] Once archive is created (and tested if -T is used, which is recommended), clear the archive bits of files processed. (in the manual page but not in --help)man
-AS (in the manual page but not in --help)man
--archive-set[WIN32] Only include files that have the archive bit set. (in the manual page but not in --help)man
-B (in the manual page but not in --help)man
--binary[VM/CMS and MVS] force file to be read binary (default is text). (in the manual page but not in --help)man
-Bn[TANDEM] set Edit/Enscribe formatting options with n defined as (in the manual page but not in --help)man
--entry-commentsAdd one-line comments for each file. (in the manual page but not in --help)man
-C (in the manual page but not in --help)man
--preserve-case[VMS] Preserve case all on VMS. (in the manual page but not in --help)man
-C2 (in the manual page but not in --help)man
--preserve-case-2[VMS] Preserve case ODS2 on VMS. (in the manual page but not in --help)man
-C5 (in the manual page but not in --help)man
--preserve-case-5[VMS] Preserve case ODS5 on VMS. (in the manual page but not in --help)man
--deleteRemove (delete) entries from a zip archive. (in the manual page but not in --help)man
-db (in the manual page but not in --help)man
--display-bytesDisplay running byte counts showing the bytes zipped and the bytes to go. (in the manual page but not in --help)man
-dc (in the manual page but not in --help)man
--display-countsDisplay running count of entries zipped and entries to go. (in the manual page but not in --help)man
-dd (in the manual page but not in --help)man
--display-dotsDisplay dots while each entry is zipped (except on ports that have their own progress indicator). (in the manual page but not in --help)man
-df (in the manual page but not in --help)man
--datafork[MacOS] Include only data-fork of files zipped into the archive. (in the manual page but not in --help)man
-dg (in the manual page but not in --help)man
--display-globaldotsDisplay progress dots for the archive instead of for each file. (in the manual page but not in --help)man
-du (in the manual page but not in --help)man
--display-usizeDisplay the uncompressed size of each entry. (in the manual page but not in --help)man
-dv (in the manual page but not in --help)man
--display-volumeDisplay the volume (disk) number each entry is being read from, if reading an existing archive, and being written to. (in the manual page but not in --help)man
-D (in the manual page but not in --help)man
--no-dir-entriesDo not create entries in the zip archive for directories. (in the manual page but not in --help)man
-DF (in the manual page but not in --help)man
--difference-archiveCreate an archive that contains all new and changed files since the original archive was created. (in the manual page but not in --help)man
--encryptEncrypt the contents of the zip archive using a password which is entered on the terminal in response to a prompt (this will not be echoed; (in the manual page but not in --help)man
-E (in the manual page but not in --help)man
--longnames[OS/2] Use the .LONGNAME Extended Attribute (if found) as filename. (in the manual page but not in --help)man
--freshenReplace (freshen) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive; (in the manual page but not in --help)man
--fix (in the manual page but not in --help)man
-FF (in the manual page but not in --help)man
--fixfixFix the zip archive. (in the manual page but not in --help)man
-FI (in the manual page but not in --help)man
--fifo[Unix] Normally zip skips reading any FIFOs (named pipes) encountered, as zip can hang if the FIFO is not being fed. (in the manual page but not in --help)man
-FS (in the manual page but not in --help)man
--filesyncSynchronize the contents of an archive with the files on the OS. (in the manual page but not in --help)man
-g (in the manual page but not in --help)man
--growGrow (append to) the specified zip archive, instead of creating a new one. (in the manual page but not in --help)man
-h (in the manual page but not in --help)man
-? (in the manual page but not in --help)man
--helpDisplay the zip help information (this also appears if zip is run with no arguments). (in the manual page but not in --help)man
--more-helpDisplay extended help including more on command line format, pattern matching, and more obscure options. (in the manual page but not in --help)man
-I (in the manual page but not in --help)man
--no-image[Acorn RISC OS] Don't scan through Image files. (in the manual page but not in --help)man
-ic (in the manual page but not in --help)man
--ignore-case[VMS, WIN32] Ignore case when matching archive entries. (in the manual page but not in --help)man
-j (in the manual page but not in --help)man
--junk-pathsStore just the name of a saved file (junk the path), and do not store directory names. (in the manual page but not in --help)man
-jj (in the manual page but not in --help)man
--absolute-path[MacOS] record Fullpath (+ Volname). (in the manual page but not in --help)man
-J (in the manual page but not in --help)man
--junk-sfxStrip any prepended data (e.g. a SFX stub) from the archive. (in the manual page but not in --help)man
-k (in the manual page but not in --help)man
--DOS-namesAttempt to convert the names and paths to conform to MSDOS, store only the MSDOS attribute (just the user write attribute from Unix), and mark the entry as made under MSDOS (even though it was not); (in the manual page but not in --help)man
-l (in the manual page but not in --help)man
--to-crlfTranslate the Unix end-of-line character LF into the MSDOS convention CR LF. (in the manual page but not in --help)man
-la (in the manual page but not in --help)man
--log-appendAppend to existing logfile. (in the manual page but not in --help)man
-li (in the manual page but not in --help)man
--log-infoInclude information messages, such as file names being zipped, in the log. (in the manual page but not in --help)man
-ll (in the manual page but not in --help)man
--from-crlfTranslate the MSDOS end-of-line CR LF into Unix LF. (in the manual page but not in --help)man
-L (in the manual page but not in --help)man
--licenseDisplay the zip license. (in the manual page but not in --help)man
-m (in the manual page but not in --help)man
--moveMove the specified files into the zip archive; (in the manual page but not in --help)man
-MM (in the manual page but not in --help)man
--must-matchAll input patterns must match at least one file and all input files found must be readable. (in the manual page but not in --help)man
-nw (in the manual page but not in --help)man
--no-wildDo not perform internal wildcard processing (shell processing of wildcards is still done by the shell unless the arguments are escaped). (in the manual page but not in --help)man
-N (in the manual page but not in --help)man
--notes[Amiga, MacOS] Save Amiga or MacOS filenotes as zipfile comments. (in the manual page but not in --help)man
-o (in the manual page but not in --help)man
--latest-timeSet the "last modified" time of the zip archive to the latest (oldest) "last modified" time found among the entries in the zip archive. (in the manual page but not in --help)man
-O output-file (in the manual page but not in --help)man
--output-file output-fileProcess the archive changes as usual, but instead of updating the existing archive, output the new archive to output-file. (in the manual page but not in --help)man
-p (in the manual page but not in --help)man
--pathsInclude relative file paths as part of the names of files stored in the archive. (in the manual page but not in --help)man
--quietQuiet mode; (in the manual page but not in --help)man
-Qn--Q-flag n (in the manual page but not in --help)man
--recurse-pathsTravel the directory structure recursively; (in the manual page but not in --help)man
-R (in the manual page but not in --help)man
--recurse-patternsTravel the directory structure recursively starting at the current directory; (in the manual page but not in --help)man
-RE (in the manual page but not in --help)man
--regex[WIN32] Before zip 3.0, regular expression list matching was enabled by default on Windows platforms. (in the manual page but not in --help)man
-sb (in the manual page but not in --help)man
--split-bellIf splitting and using split pause mode, ring the bell when zip pauses for each split destination. (in the manual page but not in --help)man
-sc (in the manual page but not in --help)man
--show-commandShow the command line starting zip as processed and exit. (in the manual page but not in --help)man
-sf (in the manual page but not in --help)man
--show-filesShow the files that would be operated on, then exit. (in the manual page but not in --help)man
-so (in the manual page but not in --help)man
--show-optionsShow all available options supported by zip as compiled on the current system. (in the manual page but not in --help)man
-sp (in the manual page but not in --help)man
--split-pauseIf splitting is enabled with -s, enable split pause mode. (in the manual page but not in --help)man
-su (in the manual page but not in --help)man
--show-unicodeAs -sf, but also show Unicode version of the path if exists. (in the manual page but not in --help)man
-sU (in the manual page but not in --help)man
--show-just-unicodeAs -sf, but only show Unicode version of the path if exists, otherwise show the standard version of the path. (in the manual page but not in --help)man
-sv (in the manual page but not in --help)man
--split-verboseEnable various verbose messages while splitting, showing how the splitting is being done. (in the manual page but not in --help)man
-S (in the manual page but not in --help)man
--system-hidden[MSDOS, OS/2, WIN32 and ATARI] Include system and hidden files. (in the manual page but not in --help)man
--testTest the integrity of the new zip file. (in the manual page but not in --help)man
-u (in the manual page but not in --help)man
--updateReplace (update) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive. (in the manual page but not in --help)man
-U (in the manual page but not in --help)man
--copy-entriesCopy entries from one archive to another. (in the manual page but not in --help)man
-v (in the manual page but not in --help)man
--verboseVerbose mode or print diagnostic version info. (in the manual page but not in --help)man
-V (in the manual page but not in --help)man
--VMS-portable[VMS] Save VMS file attributes. (in the manual page but not in --help)man
-VV (in the manual page but not in --help)man
--VMS-specific[VMS] Save VMS file attributes, and all allocated blocks in a file, including any data beyond EOF. (in the manual page but not in --help)man
-w (in the manual page but not in --help)man
--VMS-versions[VMS] Append the version number of the files to the name, including multiple versions of files. (in the manual page but not in --help)man
-ww (in the manual page but not in --help)man
--VMS-dot-versions[VMS] Append the version number of the files to the name, including multiple versions of files, using the .nnn format. (in the manual page but not in --help)man
-ws (in the manual page but not in --help)man
--wild-stop-dirsWildcards match only at a directory level. (in the manual page but not in --help)man
-X (in the manual page but not in --help)man
--no-extraDo not save extra file attributes (Extended Attributes on OS/2, uid/gid and file times on Unix). (in the manual page but not in --help)man
--symlinksFor UNIX and VMS (V8.3 and later), store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link. (in the manual page but not in --help)man
-z (in the manual page but not in --help)man
--archive-commentPrompt for a multi-line comment for the entire zip archive. (in the manual page but not in --help)man
-#(-0, -1, -2, -3, -4, -5, -6, -7, -8, -9) (in the manual page but not in --help)man
--use-privileges[WIN32] Use priviliges (if granted) to obtain all aspects of WinNT security. (in the manual page but not in --help)man
--names-stdinTake the list of input files from standard input. (in the manual page but not in --help)man
--volume-label[MSDOS, OS/2, WIN32] Include the volume label for the drive holding the first file to be compressed. (in the manual page but not in --help)man
Exit status (18) from the manual page
0normal;
2unexpected end of zip file.
3a generic error in the zipfile format was detected.
4zip was unable to allocate memory for one or more buffers during program initialization.
5a severe error in the zipfile format was detected.
6entry too large to be processed (such as input files larger than 2 GB when not using Zip64 or trying to read an existing archive that is too large) or entry too large to be split with zipsplit
7invalid comment format
8zip -T failed or out of memory
9the user aborted zip prematurely with control-C (or similar)
10zip encountered an error while using a temp file
11read or seek error
12zip has nothing to do
13missing or empty zip file
14error writing to a file
15zip was unable to create a file to write to
16bad command line parameters
18zip could not open a specified file to read
19zip was compiled with options not supported on this system

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