1ZIP(1L) ZIP(1L)
2
3
4
6 zip, zipcloak, zipnote, zipsplit - package and compress (archive) files
7
9 zip [-aABcdDeEfFghjklLmoqrRSTuvVwXyz!@$] [-b path] [-n suffixes]
10 [-t mmddyyyy] [-tt mmddyyyy] [ zipfile [ file1 file2 ...]] [-xi list]
11
12 zipcloak [-dhL] [-b path] zipfile
13
14 zipnote [-hwL] [-b path] zipfile
15
16 zipsplit [-hiLpst] [-n size] [-b path] zipfile
17
19 zip is a compression and file packaging utility for Unix, VMS, MSDOS,
20 OS/2, Windows NT, Minix, Atari and Macintosh, Amiga and Acorn RISC OS.
21
22 It is analogous to a combination of the UNIX commands tar(1) and com‐
23 press(1) and is compatible with PKZIP (Phil Katz's ZIP for MSDOS sys‐
24 tems).
25
26 A companion program (unzip(1L)), unpacks zip archives. The zip and
27 unzip(1L) programs can work with archives produced by PKZIP, and PKZIP
28 and PKUNZIP can work with archives produced by zip. zip version 2.31
29 is compatible with PKZIP 2.04. Note that PKUNZIP 1.10 cannot extract
30 files produced by PKZIP 2.04 or zip 2.31. You must use PKUNZIP 2.04g or
31 unzip 5.0p1 (or later versions) to extract them.
32
33 For a brief help on zip and unzip, run each without specifying any
34 parameters on the command line.
35
36 The program is useful for packaging a set of files for distribution;
37 for archiving files; and for saving disk space by temporarily compress‐
38 ing unused files or directories.
39
40 The zip program puts one or more compressed files into a single zip ar‐
41 chive, along with information about the files (name, path, date, time
42 of last modification, protection, and check information to verify file
43 integrity). An entire directory structure can be packed into a zip ar‐
44 chive with a single command. Compression ratios of 2:1 to 3:1 are com‐
45 mon for text files. zip has one compression method (deflation) and can
46 also store files without compression. zip automatically chooses the
47 better of the two for each file to be compressed.
48
49 When given the name of an existing zip archive, zip will replace iden‐
50 tically named entries in the zip archive or add entries for new names.
51 For example, if foo.zip exists and contains foo/file1 and foo/file2,
52 and the directory foo contains the files foo/file1 and foo/file3, then:
53
54 zip -r foo foo
55
56 will replace foo/file1 in foo.zip and add foo/file3 to foo.zip. After
57 this, foo.zip contains foo/file1, foo/file2, and foo/file3, with
58 foo/file2 unchanged from before.
59
60 If the file list is specified as -@, [Not on MacOS] zip takes the list
61 of input files from standard input. Under UNIX, this option can be
62 used to powerful effect in conjunction with the find(1) command. For
63 example, to archive all the C source files in the current directory and
64 its subdirectories:
65
66 find . -name "*.[ch]" -print | zip source -@
67
68 (note that the pattern must be quoted to keep the shell from expanding
69 it). zip will also accept a single dash ("-") as the zip file name, in
70 which case it will write the zip file to standard output, allowing the
71 output to be piped to another program. For example:
72
73 zip -r - . | dd of=/dev/nrst0 obs=16k
74
75 would write the zip output directly to a tape with the specified block
76 size for the purpose of backing up the current directory.
77
78 zip also accepts a single dash ("-") as the name of a file to be com‐
79 pressed, in which case it will read the file from standard input,
80 allowing zip to take input from another program. For example:
81
82 tar cf - . | zip backup -
83
84 would compress the output of the tar command for the purpose of backing
85 up the current directory. This generally produces better compression
86 than the previous example using the -r option, because zip can take
87 advantage of redundancy between files. The backup can be restored using
88 the command
89
90 unzip -p backup | tar xf -
91
92 When no zip file name is given and stdout is not a terminal, zip acts
93 as a filter, compressing standard input to standard output. For exam‐
94 ple,
95
96 tar cf - . | zip | dd of=/dev/nrst0 obs=16k
97
98 is equivalent to
99
100 tar cf - . | zip - - | dd of=/dev/nrst0 obs=16k
101
102 zip archives created in this manner can be extracted with the program
103 funzip which is provided in the unzip package, or by gunzip which is
104 provided in the gzip package. For example:
105
106 dd if=/dev/nrst0 ibs=16k | funzip | tar xvf -
107
108 When changing an existing zip archive, zip will write a temporary file
109 with the new contents, and only replace the old one when the process of
110 creating the new version has been completed without error.
111
112 If the name of the zip archive does not contain an extension, the
113 extension .zip is added. If the name already contains an extension
114 other than .zip the existing extension is kept unchanged.
115
117 -a [Systems using EBCDIC] Translate file to ASCII format.
118
119 -A Adjust self-extracting executable archive. A self-extracting
120 executable archive is created by prepending the SFX stub to an
121 existing archive. The -A option tells zip to adjust the entry
122 offsets stored in the archive to take into account this "pream‐
123 ble" data.
124
125 Note: self-extracting archives for the Amiga are a special case. At
126 present, only the Amiga port of Zip is capable of adjusting or updating
127 these without corrupting them. -J can be used to remove the SFX stub
128 if other updates need to be made.
129
130 -B [VM/CMS and MVS] force file to be read binary (default is text).
131
132 -Bn [TANDEM] set Edit/Enscribe formatting options with n defined as
133 bit 0: Don't add delimiter (Edit/Enscribe)
134 bit 1: Use LF rather than CR/LF as delimiter (Edit/Enscribe)
135 bit 2: Space fill record to maximum record length (Enscribe)
136 bit 3: Trim trailing space (Enscribe)
137 bit 8: Force 30K (Expand) large read for unstructured files
138
139 -b path
140 Use the specified path for the temporary zip archive. For exam‐
141 ple:
142
143 zip -b /tmp stuff *
144
145 will put the temporary zip archive in the directory /tmp, copy‐
146 ing over stuff.zip to the current directory when done. This
147 option is only useful when updating an existing archive, and the
148 file system containing this old archive does not have enough
149 space to hold both old and new archives at the same time.
150
151 -c Add one-line comments for each file. File operations (adding,
152 updating) are done first, and the user is then prompted for a
153 one-line comment for each file. Enter the comment followed by
154 return, or just return for no comment.
155
156 -d Remove (delete) entries from a zip archive. For example:
157
158 zip -d foo foo/tom/junk foo/harry/\* \*.o
159
160 will remove the entry foo/tom/junk, all of the files that start
161 with foo/harry/, and all of the files that end with .o (in any
162 path). Note that shell pathname expansion has been inhibited
163 with backslashes, so that zip can see the asterisks, enabling
164 zip to match on the contents of the zip archive instead of the
165 contents of the current directory.
166
167 Under systems where the shell does not expand wildcards, such as
168 MSDOS, the backslashes are not needed. The above would then be
169
170 zip -d foo foo/tom/junk foo/harry/* *.o
171
172 Under MSDOS, -d is case sensitive when it matches names in the
173 zip archive. This requires that file names be entered in upper
174 case if they were zipped by PKZIP on an MSDOS system.
175
176 -df [MacOS] Include only data-fork of files zipped into the archive.
177 Good for exporting files to foreign operating-systems.
178 Resource-forks will be ignored at all.
179
180 -D Do not create entries in the zip archive for directories.
181 Directory entries are created by default so that their
182 attributes can be saved in the zip archive. The environment
183 variable ZIPOPT can be used to change the default options. For
184 example under Unix with sh:
185
186 ZIPOPT="-D"; export ZIPOPT
187
188 (The variable ZIPOPT can be used for any option except -i and -x
189 and can include several options.) The option -D is a shorthand
190 for -x "*/" but the latter cannot be set as default in the
191 ZIPOPT environment variable.
192
193 -e Encrypt the contents of the zip archive using a password which
194 is entered on the terminal in response to a prompt (this will
195 not be echoed; if standard error is not a tty, zip will exit
196 with an error). The password prompt is repeated to save the
197 user from typing errors.
198
199 -E [OS/2] Use the .LONGNAME Extended Attribute (if found) as file‐
200 name.
201
202 -f Replace (freshen) an existing entry in the zip archive only if
203 it has been modified more recently than the version already in
204 the zip archive; unlike the update option (-u) this will not add
205 files that are not already in the zip archive. For example:
206
207 zip -f foo
208
209 This command should be run from the same directory from which
210 the original zip command was run, since paths stored in zip ar‐
211 chives are always relative.
212
213 Note that the timezone environment variable TZ should be set
214 according to the local timezone in order for the -f , -u and -o
215 options to work correctly.
216
217 The reasons behind this are somewhat subtle but have to do with
218 the differences between the Unix-format file times (always in
219 GMT) and most of the other operating systems (always local time)
220 and the necessity to compare the two. A typical TZ value is
221 ``MET-1MEST'' (Middle European time with automatic adjustment
222 for ``summertime'' or Daylight Savings Time).
223
224 -F Fix the zip archive. This option can be used if some portions of
225 the archive are missing. It is not guaranteed to work, so you
226 MUST make a backup of the original archive first.
227
228 When doubled as in -FF the compressed sizes given inside the
229 damaged archive are not trusted and zip scans for special signa‐
230 tures to identify the limits between the archive members. The
231 single -F is more reliable if the archive is not too much dam‐
232 aged, for example if it has only been truncated, so try this
233 option first.
234
235 Neither option will recover archives that have been incorrectly
236 transferred in ascii mode instead of binary. After the repair,
237 the -t option of unzip may show that some files have a bad CRC.
238 Such files cannot be recovered; you can remove them from the ar‐
239 chive using the -d option of zip.
240
241 -g Grow (append to) the specified zip archive, instead of creating
242 a new one. If this operation fails, zip attempts to restore the
243 archive to its original state. If the restoration fails, the ar‐
244 chive might become corrupted. This option is ignored when
245 there's no existing archive or when at least one archive member
246 must be updated or deleted.
247
248 -h Display the zip help information (this also appears if zip is
249 run with no arguments).
250
251 -i files
252 Include only the specified files, as in:
253
254 zip -r foo . -i \*.c
255
256 which will include only the files that end in .c in the current
257 directory and its subdirectories. (Note for PKZIP users: the
258 equivalent command is
259
260 pkzip -rP foo *.c
261
262 PKZIP does not allow recursion in directories other than the
263 current one.) The backslash avoids the shell filename substitu‐
264 tion, so that the name matching is performed by zip at all
265 directory levels. Not escaping wildcards on shells that do
266 wildcard substitution before zip gets the command line may seem
267 to work but files in subdirectories matching the pattern will
268 never be checked and so not matched. For shells, such as Win32
269 command prompts, that do not replace file patterns containing
270 wildcards with the respective file names, zip will do the recur‐
271 sion and escaping the wildcards is not needed.
272
273 Also possible:
274
275 zip -r foo . -i@include.lst
276
277 which will only include the files in the current directory and
278 its subdirectories that match the patterns in the file
279 include.lst.
280
281 -I [Acorn RISC OS] Don't scan through Image files. When used, zip
282 will not consider Image files (eg. DOS partitions or Spark ar‐
283 chives when SparkFS is loaded) as directories but will store
284 them as single files.
285
286 For example, if you have SparkFS loaded, zipping a Spark archive
287 will result in a zipfile containing a directory (and its con‐
288 tent) while using the 'I' option will result in a zipfile con‐
289 taining a Spark archive. Obviously this second case will also be
290 obtained (without the 'I' option) if SparkFS isn't loaded.
291
292 -j Store just the name of a saved file (junk the path), and do not
293 store directory names. By default, zip will store the full path
294 (relative to the current path).
295
296 -jj [MacOS] record Fullpath (+ Volname). The complete path including
297 volume will be stored. By default the relative path will be
298 stored.
299
300 -J Strip any prepended data (e.g. a SFX stub) from the archive.
301
302 -k Attempt to convert the names and paths to conform to MSDOS,
303 store only the MSDOS attribute (just the user write attribute
304 from UNIX), and mark the entry as made under MSDOS (even though
305 it was not); for compatibility with PKUNZIP under MSDOS which
306 cannot handle certain names such as those with two dots.
307
308 -l Translate the Unix end-of-line character LF into the MSDOS con‐
309 vention CR LF. This option should not be used on binary files.
310 This option can be used on Unix if the zip file is intended for
311 PKUNZIP under MSDOS. If the input files already contain CR LF,
312 this option adds an extra CR. This ensures that unzip -a on Unix
313 will get back an exact copy of the original file, to undo the
314 effect of zip -l. See the note on binary detection for -ll
315 below.
316
317 -ll Translate the MSDOS end-of-line CR LF into Unix LF. This option
318 should not be used on binary files and a warning will be issued
319 when a file is converted that later is detected to be binary.
320 This option can be used on MSDOS if the zip file is intended for
321 unzip under Unix.
322
323 In Zip 2.31 binary detection has been changed from a simple per‐
324 centage of binary characters being considered binary to a more
325 selective method that should consider files in many character
326 sets, including UTF-8, that only include text characters in that
327 character set to be text. This allows unzip -a to convert these
328 files.
329
330 -L Display the zip license.
331
332 -m Move the specified files into the zip archive; actually, this
333 deletes the target directories/files after making the specified
334 zip archive. If a directory becomes empty after removal of the
335 files, the directory is also removed. No deletions are done
336 until zip has created the archive without error. This is useful
337 for conserving disk space, but is potentially dangerous so it is
338 recommended to use it in combination with -T to test the archive
339 before removing all input files.
340
341 -n suffixes
342 Do not attempt to compress files named with the given suffixes.
343 Such files are simply stored (0% compression) in the output zip
344 file, so that zip doesn't waste its time trying to compress
345 them. The suffixes are separated by either colons or semi‐
346 colons. For example:
347
348 zip -rn .Z:.zip:.tiff:.gif:.snd foo foo
349
350 will copy everything from foo into foo.zip, but will store any
351 files that end in .Z, .zip, .tiff, .gif, or .snd without trying
352 to compress them (image and sound files often have their own
353 specialized compression methods). By default, zip does not com‐
354 press files with extensions in the list
355 .Z:.zip:.zoo:.arc:.lzh:.arj. Such files are stored directly in
356 the output archive. The environment variable ZIPOPT can be used
357 to change the default options. For example under Unix with csh:
358
359 setenv ZIPOPT "-n .gif:.zip"
360
361 To attempt compression on all files, use:
362
363 zip -n : foo
364
365 The maximum compression option -9 also attempts compression on
366 all files regardless of extension.
367
368 On Acorn RISC OS systems the suffixes are actually filetypes (3
369 hex digit format). By default, zip does not compress files with
370 filetypes in the list DDC:D96:68E (i.e. Archives, CFS files and
371 PackDir files).
372
373 -N [Amiga, MacOS] Save Amiga or MacOS filenotes as zipfile com‐
374 ments. They can be restored by using the -N option of unzip. If
375 -c is used also, you are prompted for comments only for those
376 files that do not have filenotes.
377
378 -o Set the "last modified" time of the zip archive to the latest
379 (oldest) "last modified" time found among the entries in the zip
380 archive. This can be used without any other operations, if
381 desired. For example:
382
383 zip -o foo
384
385 will change the last modified time of foo.zip to the latest time
386 of the entries in foo.zip.
387
388 -P password
389 use password to encrypt zipfile entries (if any). THIS IS INSE‐
390 CURE! Many multi-user operating systems provide ways for any
391 user to see the current command line of any other user; even on
392 stand-alone systems there is always the threat of over-the-
393 shoulder peeking. Storing the plaintext password as part of a
394 command line in an automated script is even worse. Whenever
395 possible, use the non-echoing, interactive prompt to enter pass‐
396 words. (And where security is truly important, use strong
397 encryption such as Pretty Good Privacy instead of the relatively
398 weak encryption provided by standard zipfile utilities.)
399
400 -q Quiet mode; eliminate informational messages and comment
401 prompts. (Useful, for example, in shell scripts and background
402 tasks).
403
404 -Qn [QDOS] store information about the file in the file header with
405 n defined as
406 bit 0: Don't add headers for any file
407 bit 1: Add headers for all files
408 bit 2: Don't wait for interactive key press on exit
409
410 -r Travel the directory structure recursively; for example:
411
412 zip -r foo foo
413
414 In this case, all the files and directories in foo are saved in
415 a zip archive named foo.zip, including files with names starting
416 with ".", since the recursion does not use the shell's file-name
417 substitution mechanism. If you wish to include only a specific
418 subset of the files in directory foo and its subdirectories, use
419 the -i option to specify the pattern of files to be included.
420 You should not use -r with the name ".*", since that matches
421 ".." which will attempt to zip up the parent directory (proba‐
422 bly not what was intended).
423
424 -R Travel the directory structure recursively starting at the cur‐
425 rent directory; for example:
426
427 zip -R foo '*.c'
428
429 In this case, all the files matching *.c in the tree starting at
430 the current directory are stored into a zip archive named
431 foo.zip. Note for PKZIP users: the equivalent command is
432
433 pkzip -rP foo *.c
434
435 -S [MSDOS, OS/2, WIN32 and ATARI] Include system and hidden files.
436 [MacOS] Includes finder invisible files, which are ignored oth‐
437 erwise.
438
439 -t mmddyyyy
440 Do not operate on files modified prior to the specified date,
441 where mm is the month (0-12), dd is the day of the month (1-31),
442 and yyyy is the year. The ISO 8601 date format yyyy-mm-dd is
443 also accepted. For example:
444
445 zip -rt 12071991 infamy foo
446
447 zip -rt 1991-12-07 infamy foo
448
449 will add all the files in foo and its subdirectories that were
450 last modified on or after 7 December 1991, to the zip archive
451 infamy.zip.
452
453 -tt mmddyyyy
454 Do not operate on files modified after or at the specified date,
455 where mm is the month (0-12), dd is the day of the month (1-31),
456 and yyyy is the year. The ISO 8601 date format yyyy-mm-dd is
457 also accepted. For example:
458
459 zip -rtt 11301995 infamy foo
460
461 zip -rtt 1995-11-30 infamy foo
462
463 will add all the files in foo and its subdirectories that were
464 last modified before the 30 November 1995, to the zip archive
465 infamy.zip.
466
467 -T Test the integrity of the new zip file. If the check fails, the
468 old zip file is unchanged and (with the -m option) no input
469 files are removed.
470
471 -u Replace (update) an existing entry in the zip archive only if it
472 has been modified more recently than the version already in the
473 zip archive. For example:
474
475 zip -u stuff *
476
477 will add any new files in the current directory, and update any
478 files which have been modified since the zip archive stuff.zip
479 was last created/modified (note that zip will not try to pack
480 stuff.zip into itself when you do this).
481
482 Note that the -u option with no arguments acts like the -f
483 (freshen) option.
484
485 -v Verbose mode or print diagnostic version info.
486
487 Normally, when applied to real operations, this option enables
488 the display of a progress indicator during compression and
489 requests verbose diagnostic info about zipfile structure oddi‐
490 ties.
491
492 When -v is the only command line argument, and either stdin or
493 stdout is not redirected to a file, a diagnostic screen is
494 printed. In addition to the help screen header with program
495 name, version, and release date, some pointers to the Info-ZIP
496 home and distribution sites are given. Then, it shows informa‐
497 tion about the target environment (compiler type and version, OS
498 version, compilation date and the enabled optional features used
499 to create the zip executable.
500
501 -V [VMS] Save VMS file attributes and use portable form. zip ar‐
502 chives created with this option are truncated at EOF but still
503 may not be usable on other systems depending on the file types
504 being zipped.
505
506 -VV [VMS] Save VMS file attributes. zip archives created with this
507 option include the entire file and should be able to recreate
508 most VMS files on VMS systems but these archives will generally
509 not be usable on other systems.
510
511 -w [VMS] Append the version number of the files to the name,
512 including multiple versions of files. (default: use only the
513 most recent version of a specified file).
514
515 -x files
516 Explicitly exclude the specified files, as in:
517
518 zip -r foo foo -x \*.o
519
520 which will include the contents of foo in foo.zip while exclud‐
521 ing all the files that end in .o. The backslash avoids the
522 shell filename substitution, so that the name matching is per‐
523 formed by zip at all directory levels. If you do not escape
524 wildcards in patterns it may seem to work but files in subdirec‐
525 tories will not be checked for matches.
526
527 Also possible:
528
529 zip -r foo foo -x@exclude.lst
530
531 which will include the contents of foo in foo.zip while exclud‐
532 ing all the files that match the patterns in the file
533 exclude.lst (each file pattern on a separate line).
534
535 -X Do not save extra file attributes (Extended Attributes on OS/2,
536 uid/gid and file times on Unix).
537
538 -y Store symbolic links as such in the zip archive, instead of com‐
539 pressing and storing the file referred to by the link (UNIX
540 only).
541
542 -z Prompt for a multi-line comment for the entire zip archive. The
543 comment is ended by a line containing just a period, or an end
544 of file condition (^D on UNIX, ^Z on MSDOS, OS/2, and VAX/VMS).
545 The comment can be taken from a file:
546
547 zip -z foo < foowhat
548
549 -# Regulate the speed of compression using the specified digit #,
550 where -0 indicates no compression (store all files), -1 indi‐
551 cates the fastest compression method (less compression) and -9
552 indicates the slowest compression method (optimal compression,
553 ignores the suffix list). The default compression level is -6.
554
555 -! [WIN32] Use priviliges (if granted) to obtain all aspects of
556 WinNT security.
557
558 -@ Take the list of input files from standard input. Only one file‐
559 name per line.
560
561 -$ [MSDOS, OS/2, WIN32] Include the volume label for the drive
562 holding the first file to be compressed. If you want to include
563 only the volume label or to force a specific drive, use the
564 drive name as first file name, as in:
565
566 zip -$ foo a: c:bar
567
569 The simplest example:
570
571 zip stuff *
572
573 creates the archive stuff.zip (assuming it does not exist) and puts all
574 the files in the current directory in it, in compressed form (the .zip
575 suffix is added automatically, unless that archive name given contains
576 a dot already; this allows the explicit specification of other suf‐
577 fixes).
578
579 Because of the way the shell does filename substitution, files starting
580 with "." are not included; to include these as well:
581
582 zip stuff .* *
583
584 Even this will not include any subdirectories from the current direc‐
585 tory.
586
587 To zip up an entire directory, the command:
588
589 zip -r foo foo
590
591 creates the archive foo.zip, containing all the files and directories
592 in the directory foo that is contained within the current directory.
593
594 You may want to make a zip archive that contains the files in foo,
595 without recording the directory name, foo. You can use the -j option
596 to leave off the paths, as in:
597
598 zip -j foo foo/*
599
600 If you are short on disk space, you might not have enough room to hold
601 both the original directory and the corresponding compressed zip ar‐
602 chive. In this case, you can create the archive in steps using the -m
603 option. If foo contains the subdirectories tom, dick, and harry, you
604 can:
605
606 zip -rm foo foo/tom
607 zip -rm foo foo/dick
608 zip -rm foo foo/harry
609
610 where the first command creates foo.zip, and the next two add to it.
611 At the completion of each zip command, the last created archive is
612 deleted, making room for the next zip command to function.
613
615 This section applies only to UNIX, though the ?, *, and [] special
616 characters are implemented on other systems including MSDOS and Win32.
617 Watch this space for details on MSDOS and VMS operation.
618
619 The UNIX shells (sh(1) and csh(1)) do filename substitution on command
620 arguments. The special characters are:
621
622 ? match any single character
623
624 * match any number of characters (including none)
625
626 [] match any character in the range indicated within the brackets
627 (example: [a-f], [0-9]).
628
629 When these characters are encountered (without being escaped with a
630 backslash or quotes), the shell will look for files relative to the
631 current path that match the pattern, and replace the argument with a
632 list of the names that matched.
633
634 The zip program can do the same matching on names that are in the zip
635 archive being modified or, in the case of the -x (exclude) or -i
636 (include) options, on the list of files to be operated on, by using
637 backslashes or quotes to tell the shell not to do the name expansion.
638 In general, when zip encounters a name in the list of files to do, it
639 first looks for the name in the file system. If it finds it, it then
640 adds it to the list of files to do. If it does not find it, it looks
641 for the name in the zip archive being modified (if it exists), using
642 the pattern matching characters described above, if present. For each
643 match, it will add that name to the list of files to be processed,
644 unless this name matches one given with the -x option, or does not
645 match any name given with the -i option.
646
647 The pattern matching includes the path, and so patterns like \*.o match
648 names that end in ".o", no matter what the path prefix is. Note that
649 the backslash must precede every special character (i.e. ?*[]), or the
650 entire argument must be enclosed in double quotes ("").
651
652 In general, use backslash to make zip do the pattern matching with the
653 -f (freshen) and -d (delete) options, and sometimes after the -x
654 (exclude) option when used with an appropriate operation (add, -u, -f,
655 or -d).
656
658 ZIPOPT contains default options that will be used when running zip
659
660 ZIP [Not on RISC OS and VMS] see ZIPOPT
661
662 Zip$Options
663 [RISC OS] see ZIPOPT
664
665 Zip$Exts
666 [RISC OS] contains extensions separated by a : that will cause
667 native filenames with one of the specified extensions to be
668 added to the zip file with basename and extension swapped. zip
669
670 ZIP_OPTS
671 [VMS] see ZIPOPT
672
674 compress(1), shar(1L), tar(1), unzip(1L), gzip(1L)
675
677 The exit status (or error level) approximates the exit codes defined by
678 PKWARE and takes on the following values, except under VMS:
679
680 0 normal; no errors or warnings detected.
681
682 2 unexpected end of zip file.
683
684 3 a generic error in the zipfile format was detected. Pro‐
685 cessing may have completed successfully anyway; some bro‐
686 ken zipfiles created by other archivers have simple work-
687 arounds.
688
689 4 zip was unable to allocate memory for one or more buffers
690 during program initialization.
691
692 5 a severe error in the zipfile format was detected. Pro‐
693 cessing probably failed immediately.
694
695 6 entry too large to split (with zipsplit), read, or write
696
697 7 invalid comment format
698
699 8 zip -T failed or out of memory
700
701 9 the user aborted zip prematurely with control-C (or simi‐
702 lar)
703
704 10 zip encountered an error while using a temp file
705
706 11 read or seek error
707
708 12 zip has nothing to do
709
710 13 missing or empty zip file
711
712 14 error writing to a file
713
714 15 zip was unable to create a file to write to
715
716 16 bad command line parameters
717
718 18 zip could not open a specified file to read
719
720 VMS interprets standard Unix (or PC) return values as other, scarier-
721 looking things, so zip instead maps them into VMS-style status codes.
722 The current mapping is as follows: 1 (success) for normal exit,
723 and (0x7fff000? + 16*normal_zip_exit_status) for all errors, where the
724 `?' is 0 (warning) for zip value 12, 2 (error) for the zip values 3, 6,
725 7, 9, 13, 16, 18, and 4 (fatal error) for the remaining ones.
726
728 zip 2.31 is not compatible with PKUNZIP 1.10. Use zip 1.1 to produce
729 zip files which can be extracted by PKUNZIP 1.10.
730
731 zip files produced by zip 2.31 must not be updated by zip 1.1 or PKZIP
732 1.10, if they contain encrypted members or if they have been produced
733 in a pipe or on a non-seekable device. The old versions of zip or PKZIP
734 would create an archive with an incorrect format. The old versions can
735 list the contents of the zip file but cannot extract it anyway (because
736 of the new compression algorithm). If you do not use encryption and
737 use regular disk files, you do not have to care about this problem.
738
739 Under VMS, not all of the odd file formats are treated properly. Only
740 stream-LF format zip files are expected to work with zip. Others can
741 be converted using Rahul Dhesi's BILF program. This version of zip
742 handles some of the conversion internally. When using Kermit to trans‐
743 fer zip files from Vax to MSDOS, type "set file type block" on the Vax.
744 When transfering from MSDOS to Vax, type "set file type fixed" on the
745 Vax. In both cases, type "set file type binary" on MSDOS.
746
747 Under VMS, zip hangs for file specification that uses DECnet syntax
748 foo::*.*.
749
750 On OS/2, zip cannot match some names, such as those including an excla‐
751 mation mark or a hash sign. This is a bug in OS/2 itself: the 32-bit
752 DosFindFirst/Next don't find such names. Other programs such as GNU
753 tar are also affected by this bug.
754
755 Under OS/2, the amount of Extended Attributes displayed by DIR is (for
756 compatibility) the amount returned by the 16-bit version of DosQuery‐
757 PathInfo(). Otherwise OS/2 1.3 and 2.0 would report different EA sizes
758 when DIRing a file. However, the structure layout returned by the
759 32-bit DosQueryPathInfo() is a bit different, it uses extra padding
760 bytes and link pointers (it's a linked list) to have all fields on
761 4-byte boundaries for portability to future RISC OS/2 versions. There‐
762 fore the value reported by zip (which uses this 32-bit-mode size) dif‐
763 fers from that reported by DIR. zip stores the 32-bit format for
764 portability, even the 16-bit MS-C-compiled version running on OS/2 1.3,
765 so even this one shows the 32-bit-mode size.
766
767 Development of Zip 3.0 is underway. See that source distribution for
768 many new features and the latest bug fixes.
769
771 Copyright (C) 1997-2005 Info-ZIP.
772
773 Copyright (C) 1990-1997 Mark Adler, Richard B. Wales, Jean-loup Gailly,
774 Onno van der Linden, Kai Uwe Rommel, Igor Mandrichenko, John Bush and
775 Paul Kienitz. Permission is granted to any individual or institution
776 to use, copy, or redistribute this software so long as all of the orig‐
777 inal files are included, that it is not sold for profit, and that this
778 copyright notice is retained.
779
780 LIKE ANYTHING ELSE THAT'S FREE, ZIP AND ITS ASSOCIATED UTILITIES ARE
781 PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED
782 OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
783 DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
784
785 Please send bug reports and comments to: zip-bugs at www.info-zip.org.
786 For bug reports, please include the version of zip (see zip -h), the
787 make options used to compile it (see zip -v), the machine and operating
788 system in use, and as much additional information as possible.
789
791 Thanks to R. P. Byrne for his Shrink.Pas program, which inspired this
792 project, and from which the shrink algorithm was stolen; to Phil Katz
793 for placing in the public domain the zip file format, compression for‐
794 mat, and .ZIP filename extension, and for accepting minor changes to
795 the file format; to Steve Burg for clarifications on the deflate for‐
796 mat; to Haruhiko Okumura and Leonid Broukhis for providing some useful
797 ideas for the compression algorithm; to Keith Petersen, Rich Wales,
798 Hunter Goatley and Mark Adler for providing a mailing list and ftp site
799 for the Info-ZIP group to use; and most importantly, to the Info-ZIP
800 group itself (listed in the file infozip.who) without whose tireless
801 testing and bug-fixing efforts a portable zip would not have been pos‐
802 sible. Finally we should thank (blame) the first Info-ZIP moderator,
803 David Kirschbaum, for getting us into this mess in the first place.
804 The manual page was rewritten for UNIX by R. P. C. Rodgers.
805
806
807
808Info-ZIP 27 February 2005 (v2.31) ZIP(1L)