Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man1/unzip.1
Real path: /usr/share/man/man1/unzip.1
Zurück
'\" te .\" Copyright (c) 1990-2017 Info-ZIP. All rights reserved. .\" .\" See the accompanying file LICENSE, version 2009-Jan-02 or later .\" (the contents of which are also included in unzip.h) for terms of use. .\" If, for some reason, all these files are missing, the Info-ZIP license .\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html .\" .\" unzip.1 by Greg Roelofs, Fulvio Marino, Jim van Zandt and others. .\" .\" ========================================================================= .TH UNZIP 1 "2016-09-29 (v6.1)" "Info-ZIP" .\" ========================================================================= .\" .\" Define .EX/.EE (for multiline user-command examples; normal Courier font). .\" Must follow ".TH"; otherwise macros get redefined. .de EX .in +4n .nf .ft CW .. .de EE .ft R .fi .in -4n .. .\" ========================================================================= .SH NAME unzip \- extract, list, or test compressed files in a ZIP archive. .PP .SH SYNOPSIS .B unzip .RB "[ " unzip_options " ]" .RI "[ " file[.zip] " ]" .RI "[ " member " ... ]" .br .B "unzip \-Z" .RB "[ " zipinfo_options " ]" .RI "[ " file[.zip] " ]" .RI "[ " member " ... ]" .PP .\" ========================================================================= .SH DESCRIPTION \fIUnZip\fP extracts, lists, or tests files in a ZIP archive (an archive format commonly used on many different systems). The default behavior (with no options) is to extract into the current directory (and subdirectories below it) all files from the specified ZIP archive. A companion program, \fIZip\fP, creates ZIP archives. .PP Info-ZIP \fIUnZip\fP and \fIZip\fP were intended to be compatible with archives created by PKWARE's \fIPKZIP\fP and \fIPKUNZIP\fP programs (originally for MS-DOS), but in many cases the program options or default behaviors differ. Nowadays, many other programs are available which work with ZIP archives. .PP Note: Beginning with \fIUnZip\fP version 6.1, the old command-line parser has been replaced by one like the one used in \fIZip\fP (version 3.0 and later). One significant change is that \fIoption negation now uses a TRAILING hyphen ("\-")\fP, so, for example, \fB\-B\-\fP negates the \fB\-B\fP option. This change was made because a double hyphen ("\-\-") now introduces a long option. .PP To display the basic built-in help, use the command: .EX unzip \-h .EE To display the extended built-in help, use the command: .EX unzip \-hh .EE The built-in help may be more current than this manual page, especially between full product releases. .PP To list all available options for a particular \fIUnZip\fP program, use the command: .EX unzip \-\-show\-options .EE This report will not include any options which are available only on other system types, or options which must be enabled at build-time but were not enabled in the particular \fIUnZip\fP program being used. .PP [VMS] On VMS, alternate program editions with VMS-style command-line interfaces are also available. For details, see the VMS-specific documentation. .\" ========================================================================= .SH ARGUMENTS .TP .I file[.zip] File path/name of a ZIP archive. A wildcard name may be used to specify multiple ZIP archives to be processed in one command. On VMS systems, any of the standard wildcards for a directory/file specification may be used: "...", "*", or "%" (or, since VMS V7.2, "?"). On non-VMS systems, a wildcard name may be used only in the filename part of the file specification, not in the directory part, and, on Unix, characters which are special to the shell must be escaped or quoted to protect them from processing by the shell. If a wildcard is used, then each matching archive file is processed in an order determined by the operating system or shell (or file system). Non-VMS wildcard expressions are similar to those supported (for "globbing") in commonly used Unix shells (\fIcsh\fP, \fIksh\fP, \fIsh\fP, and so on) and may contain: .RS .IP * Matches a sequence of 0 or more characters. .IP ? Matches exactly 1 character. .IP [.\|.\|.] Matches any single character found inside the brackets. Ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point ("!") or a caret ("^") follows the left bracket, then the range of characters within the brackets is complemented. That is, anything \fIexcept\fP the characters inside the brackets is considered a match. To specify a literal left bracket, use the three-character sequence "[[]". .RE .IP If no wildcard matches are found, then the specification is assumed to be a literal filename. If that also fails, then the suffix "\fC\.zip\fR" and/or "\fC\.ZIP\fR" is appended, and the resulting name is tried. (For this reason, if a non-existent file is specified, then the resulting error message may mention these other names with their "\fC\.zip\fR" or "\fC\.ZIP\fR" suffixes.) .IP Note that a "\fC\.zip\fR" or "\fC\.ZIP\fR" name ending on an archive is merely a convention, not a requirement. For example, a self-extracting ZIP archive named "\fCfred\fR" or "\fCfred.exe\fR" could be processed as if it were an ordinary archive; just specify the actual file name with its actual name ending (if any), whatever that may be. .IP Strictly speaking, an archive name is optional, but, except in a special case like "\fCunzip\ \-v\fR", it's difficult to do much useful work without specifying an archive. .TP .IR member " ..." An optional list of archive members to be processed, separated by spaces. If no member list is specified, then all archive members are processed. Wildcard patterns (like those used for an archive file name on Unix, described above) may be used to match multiple members. Again, be sure to quote expressions that would otherwise be expanded or modified by the operating system or shell. .IP On Mac OS X systems, file attributes, a resource fork, and similar data may be stored in a separate AppleDouble archive member which has a "._" name prefix. When restoring files with such attributes (no \fB\-J\fP/\fB\-\-junk-attrs\fP option, and the destination file system supports such attributes), if the user specifies only the main archive member, then \fIUnZip\fP should automatically handle the corresponding AppleDouble archive member. If \fB\-J\fP/\fB\-\-junk-attrs\fP is specified, or the destination file system does not support such file attributes (so that an AppleDouble archive member will be stored as a separate file), then AppleDouble archive members are not handled automatically, and the user must specify patterns which explicitly include any desired AppleDouble archive members. .IP On VMS systems, the wildcard rules used for archive members are the same as on Unix systems. VMS wildcard rules are used only for archive file specifications, not for archive member patterns. .\" ========================================================================= .SH OPTIONS .PP \fIUnZip\fP's usage summary ("\fCunzip\ \-h\fR") is kept short to try to accommodate small terminal/emulator screens, so it's normally incomplete. The option list below should be complete. .\" -------------------------------------------------------------------- .SH OPTIONS (ZipInfo Mode) .PD 0 .B \-Z .TP .PD .B \-\-zipinfo\-mode \fIZipInfo\fP mode. If the first option on the command line is \fB\-Z\fP, then the program runs in \fIZipInfo\fP mode. Remaining options are interpreted as \fIZipInfo\fP options. See the \fBzipinfo\fP manual page for a description of those options. .\" -------------------------------------------------------------------- .SH OPTIONS (Primary Mode) Options in this group (\fB\-c \-f \-h \-l \-p \-T \-t \-u \-v \-vq \-z\fP) specify the primary mode of operation of \fIUnZip\fP. Only one of these primary mode options may be specified. .PP .PD 0 .B \-c .TP .PD .B \-\-to\-stdout .br Primary Mode. Extract files to stdout/screen. This option is similar to the \fB\-p\fP option except that the name of each file is displayed as it is extracted, and the \fB\-a\fP option is allowed, which can provide automatic ASCII-EBCDIC conversion, where appropriate. .PP .PD 0 .B \-f .TP .PD .B \-\-freshen .br Primary Mode. Freshen existing files. That is, extract only those files that already exist on disk and that are newer than the disk copies. By default, \fIUnZip\fP queries the user before overwriting, but the \fB\-o\fP option may be used to suppress the queries. Note that on many operating systems, the TZ (timezone) environment variable must be set correctly in order for \fB\-f\fP/\fB\-\-freshen\fP and \fB\-u\fP/\fB\-\-update\fP to work properly. (On Unix the variable is usually set automatically.) The reasons for this are somewhat subtle but have to do with the differences between DOS-format file times (always local time) and Unix-format times (always UTC) and the necessity to compare the two. A typical TZ value is "PST8PDT" (US Pacific time with automatic adjustment for Daylight Saving Time). .PP .PD 0 .B \-h .TP .PD .B \-\-help .br Primary Mode. Display brief (roughly 24 lines) usage instructions. See also \fB\-hh\fP. .PP .PD 0 .B \-hh .TP .PD .B \-\-long\-help .br Primary Mode. Display extended help (more complete usage instructions). See also \fB\-h\fP. .PP .PD 0 .B \-l .TP .PD .B \-\-list .br Primary Mode. List archive members. By default, a brief format is used, which includes the following items: member name, uncompressed file size ("Length"), and modification date-time of the member. A summary is included at the end of the report, showing total size and count for all the members in the report. Specifying a member list limits the report to those members. .IP Adding \fB\-v\fP (\fB\-\-verbose\fP) to an "unzip \-l" command line adds the following items to the report: compression method, compressed size ("Size"), compression ratio, and 32-bit CRC. .IP In contrast to some other programs, \fIUnZip\fP does not include the 12-byte encryption header in the compressed size values for a Traditionally encrypted member. Therefore, compressed size and compression ratio figures are independent of the member's encryption status and show the correct compression performance. (The complete size of the encrypted compressed data stream for archive members is reported by the more verbose \fIZipInfo\fP reports. See the separate \fIzipinfo\fP manual page.) .IP If \fIUnZip\fP was built with OS2_EAS enabled, then the \fB\-l\fP report also includes the sizes of stored OS/2 extended attributes (EAs) and OS/2 access control lists (ACLs). In addition, the archive comment and individual member comments (if any) are displayed. .IP If a file was archived from a single-case file system (for example, the old MS-DOS FAT file system) and the \fB\-L\fP option was given, then the filename is converted to lowercase and is shown prefixed with a caret (^). .IP Note: If only \fB\-v\fP (\fB\-\-verbose\fP) is specified with an archive name, then \fIUnZip\fP acts as if "\fB\-l\fP \fB\-v\fP" were specified, and a detailed listing is generated. .PP .PD 0 .B \-\-license .TP .PD Primary Mode. Display the Info-ZIP license. .PP .PD 0 .B \-p .TP .PD .B \-\-pipe\-to\-stdout .br Primary Mode. Extract files to stdout (pipe). Only the actual file data for the members are sent to stdout (no file names, or other information, as would be displayed with \fB\-c\fP), and the files are always extracted in binary format, just as they are stored (with no line-ending or ASCII-EBCDIC conversions). .PP .PD 0 .B \-T .TP .PD .B \-\-timestamp\-new .br Primary Mode. Set the timestamp on the archive(s) to that of the newest file in each one. This corresponds to \fIZip\fP's \fB\-go\fP option, except that it can be used on wildcard archives (for example, "\fCunzip\ \-T\ '*.zip'\fR") and may be faster. .PP .PD 0 .B \-t .TP .PD .B \-\-test .br Primary Mode. Test archive members. Testing means that each archive member is extracted in memory (expanding and decrypting, as needed), but not written to a file. The resulting CRC (cyclic redundancy check, an enhanced checksum) of the extracted data is then compared with the original file's stored CRC value, and an error message is emitted if a CRC mismatch is detected. .IP Adding \fB\-v\fP to \fB\-t\fP adds some diagnostic information to the report for archive members with LZMA or PPMd compression. .PP .PD 0 .B \-u .TP .PD .B \-\-update .br Primary mode. Update existing files and create new ones if needed. This mode performs the same function as the Freshen (\fB\-f\fP) mode, extracting (with query) files that are newer than those with the same name on disk, but it also extracts those files that do not already exist on disk. See \fB\-f\fP, above, for information on setting the timezone properly. .PP .PD 0 .B \-v .TP .PD .B \-\-verbose .br Primary mode (when alone) or option. When used as a primary mode (alone), and no archive is specified, an "\fCunzip \-v\fR" command generates a report showing the program version, build options, and relevant environment variables. .IP When used with some other primary mode option, \fB\-v\fP can make output more verbose. .IP If no other primary mode is specified, and an archive \fIis\fP specified, then \fIUnZip\fP acts as if "\fB\-l\fP \fB\-v\fP" were specified, and a detailed listing is generated. See \fB\-l\fP. .PP .PD 0 .B \-\-version .TP .PD Primary Mode. Display the program version, build options, and relevant environment variables. .IP Currently, \fB\-\-version\fP is implemented as a synonym for \fB\-v\fP/\fB\-\-verbose\fP, so, for proper operation, it must be specified with no other options. .PP .PD 0 .B \-vq .TP .PD .B \-\-quick-version .br Primary mode. Display a brief (one-line) program version report. .PP .PD 0 .B \-z .TP .PD .B \-\-zipfile\-comment .br Primary mode. Display only the archive comment. .\" -------------------------------------------------------------------- .SH OPTIONS (Ordinary) .PP .PD 0 .B \-0 .TP .PD .B \-\-no-char\-set .br Do not transform FAT/NTFS names. By default, a particular character mapping (CP850) is applied to the names of archive members which originated on a FAT or NTFS file system (typically on an MS-DOS or Windows system). This can cause unexpected characters in extracted file names if the corresponding (inverse) mapping was not used when the archive was created. With \-0/\-\-no\-char\-set, the extracted file name should agree with the name stored in the archive. .IP On Unix (or BeOS), \-0/\-\-no\-char\-set effectively overrides any \-I/\-\-iso-char-set or \-O/\-\-oem-char-set option which may also be specified. .PP .PD 0 .B \-2 .TP .PD .B \-\-force\-ods2 .br [VMS] Convert extracted file names to ODS2-compatible names, even on an ODS5 file system. By default, if the destination file system is ODS5, case is preserved, and extended file name characters are caret-escaped as needed, while if the destination file system is ODS2, ODS2-invalid characters are replaced by underscores. .PP .PD 0 .B \-A .TP .PD .B \-\-api\-help .br [DLL, object library] Print extended help for the DLL or object library application programming interface (API). .PP .PD 0 .B \-a .TP .PD .B \-\-ascii .br Convert text files. Ordinarily, all files are extracted exactly as they are stored, byte-for-byte. With \fB\-a\fP, line endings in a text file are adjusted to the local standard as the file is extracted. When appropriate, ASCII<\-\->EBCDIC conversion is also done. .IP \fIZip\fP (or a similar archiving program) identifies files as "binary" or "text" when they are archived. (A short-format \fIZipInfo\fP report denotes a binary file with a "b", and a text file with a "t".) \fIZip\fP's identification of text files may not be perfect, so \fIUnZip\fP prints "\fC[binary]\fR" or "\fC[text]\fR" as a visual check for each file it extracts with \fB\-a\fP. The \fB\-aa\fP option forces all files to be extracted (and converted) as text, regardless of the supposed file type. .IP [VMS] On VMS, for archives with VMS attribute information (made with "zip\ \-V" or "ZIP\ /VMS"), files are always created with their original record formats. For archives without VMS attribute information (not made with "zip\ \-V" or "ZIP\ /VMS"), all files are normally created with Stream_LF record format. With \fB\-a\fP, text files are normally created with variable-length record format, but adding \fB\-S\fP gives them Stream_LF record format. With \fB\-aa\fP, all files are treated as text files. See also \fB\-b\fP and \fB\-S\fP. .PP .PD 0 .B \-B .TP .PD .B \-\-backup .br [When built with UNIXBACKUP enabled] Save a backup copy of each overwritten file. The backup file gets the name of the target file with a tilde and optionally a unique sequence number (up to 5 digits) appended. The sequence number is appended whenever another file with the original name plus tilde already exists. When used together with the "overwrite all" option, \fB\-o\fP, numbered backup files are never created. In this case, all backup files are named as the original file with an appended tilde, and existing backup files are deleted without notice. This feature works similarly to the default behavior of \fIemacs\fP(1) in many locations. .IP Example: the old copy of "\fCfoo\fR" is renamed to "\fCfoo~\fR". .IP Warning: Users should be aware that the \fB\-B\fP option does not prevent loss of existing data under all circumstances. For example, when \fIUnZip\fP is run in overwrite-all mode, an existing "\fCfoo~\fR" file is deleted before \fIUnZip\fP attempts to rename "\fCfoo\fR" to "\fCfoo~\fR". When this rename attempt fails (because of a file lock, insufficient privileges, or any other reason), the extraction of "\fCfoo~\fR" gets cancelled, but the old backup file is already lost. A similar scenario takes place when the sequence number range for numbered backup files gets exhausted (99999, or 65535 for 16-bit systems). In this case, the backup file with the maximum sequence number is deleted and replaced by the new backup version without notice. .PP .PD 0 .B \-b .TP .PD .B \-\-binary .br [Tandem, VMS] Selects the file record format used when extracting binary files. \-b may conflict or interact with \-a in different ways on different system types. \-b is ignored on systems other than Tandem and VMS. .IP \fIZip\fP (or a similar archiving program) identifies files as "binary" or "text" when they are archived. (A short-format \fIZipInfo\fP report denotes a binary file with a "b", and a text file with a "t".) .\" \fIZip\fP's identification of text files may not be perfect, so .\" \fIUnZip\fP prints "\fC[binary]\fR" or "\fC[text]\fR" as a visual check .\" for each file it extracts with \fB\-b\fP. The \fB\-bb\fP option forces .\" all files to be extracted (and converted) as binary, regardless of the .\" supposed file type. .IP [Tandem] Force the creation files with filecode type 180 ('C') when extracting archive members marked as "text". (On Tandem, \fB\-a\fP is enabled by default, see above). .IP [VMS] On VMS, for archives with VMS attribute information (made with "zip\ \-V" or "ZIP\ /VMS"), files are always created with their original record formats. For archives without VMS attribute information (not made with "zip\ \-V" or "ZIP\ /VMS"), files are normally created with Stream_LF record format. With \fB\-b\fP, binary files are created with fixed-length, 512-byte record format. With \fB\-bb\fP, all files are treated as binary files. When extracting to standard output (\fB\-c\fP or \fB\-p\fP option in effect), the default conversion of text record delimiters is disabled for binary files (with \fB\-b\fP), or for all files (with \fB\-bb\fP). .PP .PD 0 .B \-C .TP .PD .BR \-\-ignore\-case "\ \ \ \ ([CMS, MVS] " \-\-CMS\-MVS\-lower ) .br Use case-insensitive name matching for names in the member list and the \fB\-x\fP excluded-member list on the command line. By default, case-sensitive matching is done. For example, specifying "\fCmakefile\fR" on the command line will match \fIonly\fP "makefile" in the archive, not "Makefile" or "MAKEFILE". On many systems, the local file system is case-insensitive, so case-insensitive name matching would be more natural. With \fB\-C\fP, "\fCmakefile\fR" would match "makefile", "Makefile", or "MAKEFILE". .IP \fB\-C\fP does not affect the search for the ZIP archive file(s), nor the matching of archive members to existing files on the extraction path. So, on a case-sensitive file system, \fIUnZip\fP will never try to overwrite a file "FOO" when extracting a member named "foo"! .PP .PD 0 .B \-c .TP .PD .B \-\-to\-stdout .br Primary Mode. Extract files to stdout/screen. For details, see Primary Mode options. .PP .PD 0 .B \-D .TP .PD .B \-\-dir\-timestamps .br Control timestamps on extracted files and directories. By default, \fIUnZip\fP restores timestamps for extracted files, but not for directories it creates. Specifying \fB\-D\fP tells \fIUnZip\fP not to restore any timestamps. Specifying \fB\-D\-\fP tells \fIUnZip\fP to restore timestamps for directories as well as other items. \fB\-D\-\fP works only on systems that support setting timestamps for directories (currently ATheOS, BeOS, MacOS, OS/2, Unix, VMS, Win32). On other systems, \fB\-D\-\fP has no effect. .IP [Non-VMS] Timestamp restoration behavior changed between \fIUnZip\fP versions 6.00 and 6.1. The following table shows the effects of various \fB\-D\fP options for both versions. .IP .EX UnZip version | 6.00 | 6.1 | Restore timestamps on: -----------+-----------+------------------------ -DD | -D | Nothing. -D | (default) | Files, not directories. (default) | -D- | Files and directories. .EE .IP [VMS] The old behavior on VMS was the same as the new behavior on all systems. (The old negated \fB\-\-D\fP option is now \fB\-D\-\fP, because of changes to the command-line parser.) .PP .PD 0 .B \-d dest_dir .TP .PD .B \-\-extract\-dir dest_dir .br Specifies a destination directory for extracted files. By default, files are extracted (and subdirectories created) in the current (default, working) directory. With \fB\-d dest_dir\fP, extraction is done into the specified directory, instead. See also \fB\-da\fP. .IP The option and directory may be concatenated without any white space between them, but this may cause normal shell behavior to be suppressed. For example, "\fC\-d\ ~\fR" (tilde) is expanded by Unix shells into the name of the user's home directory, but "\fC\-d~\fR" is treated as a literal "\fB~\fP" subdirectory of the current directory. .IP [VMS] On VMS, only a VMS-style device:[directory] specification is permitted. .PP .PD 0 .B \-da[=reuse] .TP .PD .B \-\-auto\-extract\-dir[=reuse] .br Specifies a destination directory for extracted files which is derived from the base name of the archive. By default, files are extracted (and subdirectories created) in the current (default, working) directory. With \fB\-da\fP, UnZip automatically derives a subdirectory name from the archive name, creates that subdirectory, and extracts files into that subdirectory. .IP For example, with \fB\-da\fP, extraction of "fred.zip" is done into subdirectory "fred" instead of into the current directory. (On VMS, subdirectory "[.fred]".) .IP Using this option can help to avoid cluttering the current directory with files extracted from an archive whose structure does not include a top-level directory. .IP For greater safety, by default, UnZip will refuse to extract into an automatic extraction directory which already exists. Specifying the optional keyword "reuse" will allow an existing directory to be used. .IP If \fB\-da\fP is specified as a default option in an environment variable, it can be overridden by either a negated \fB\-da\-\fP option or an explicit \fB\-d dest_dir\fP option. See also \fB\-d\fP. .PP .PD 0 .B \-E .TP .PD .B \-\-mac\-efs .br [MacOS\ (pre-OS-X)] Display contents of MacOS extra field during restore operation. .PP .PD 0 .B \-F .TP .PD .B \-\-keep\-nfs .br [Acorn] Suppress removal of NFS filetype extension from stored filenames. .IP [non-Acorn systems supporting long filenames with embedded commas, and only if compiled with ACORN_FTYPE_NFS defined] Translate filetype information from ACORN RISC OS extra field blocks into a NFS filetype extension and append it to the names of the extracted files. (When the stored filename appears already to have an appended NFS filetype extension, it is replaced by the info from the extra field.) .PP .PD 0 .B \-f .TP .PD .B \-\-freshen .br Primary Mode. Freshen existing files. For details, see Primary Mode options. .PP .PD 0 .B \-h .TP .PD .B \-\-help .br Primary Mode. Display brief (roughly 24 lines) usage instructions. For details, see Primary Mode options. .PP .PD 0 .B \-hh .TP .PD .B \-\-long\-help .br Primary Mode. Display complete usage instructions. For details, see Primary Mode options. .PP .PD 0 .B \-I char_set .TP .PD .B \-\-iso\-char\-set char_set .br [Unix] Select ISO character set \fIchar_set\fP. See also \-0 and -O. .PP .PD 0 .B \-i .TP .PD .B \-\-no\-mac\-ef\-names .br [MacOS\ (pre-OS-X)] Ignore filenames stored in MacOS extra fields. Instead, the most compatible filename stored in the generic part of the member's header is used. .PP .PD 0 .B \-J .TP .PD .B \-\-junk\-attrs .br [BeOS] Junk file attributes. The file's BeOS file attributes are not restored, only the file's data. .IP [MacOS\ (pre-OS-X)] Ignore Mac OS extra fields. .IP [Mac OS X] Do no special Mac-specific processing of AppleDouble archive members. An AppleDouble archive member is restored as a separate "._name" file, as it would be on a non-Mac file system. .IP .EX Note that "\fB\-J\fP" is \fInot\fP equivalent to "\fB\-Je\ \-Jf\ \-Jr\fP". With "\fB\-J\fP", an AppleDouble archive member is restored as a separate "._name" file, as it would be on a non-Mac file system. With "\fB\-Je\ \-Jf\ \-Jr\fP", all the data in an AppleDouble archive member are ignored, so the data fork file is restored with no extended attributes (\fB\-Je\fP), no Finder info (\fB\-Jf\fP), and no resource fork (\fB\-Jr\fP); no "._name" file is created. .IP Note that \fB\-j\fP acts on the path of an archive member, and is independent of the destination directory specified using \fB\-d\fP or \fB\-da\fP. For example, with "\fB\-d zz\fP \fB\-j=1\fP", an archive member like "a/b/c/d/ee.txt" would be extracted as "zz/b/c/d/ee.txt", with \fB\-j=1\fP stripping the "a/" off the archive path, and \fB\-d zz\fP adding the "zz/" to the path in the destination file system. .EE .PP .PD 0 .B \-Je .TP .PD .B \-\-junk\-extattr .br [Mac OS X] Ignore all Mac OS extended attributes. Extended attribute processing is available on Mac OS X 10.4 and later. See also \fB\-J\fP, \fB\-Jf\fP, \fB\-Jq\fP, and \fB\-Jr\fP. .PP .PD 0 .B \-Jf .TP .PD .B \-\-junk\-finder .br [Mac OS X] Ignore Mac OS Finder info. See also \fB\-J\fP, \fB\-Je\fP, \fB\-Jq\fP, and \fB\-Jr\fP. .PP .PD 0 .B \-Jq .TP .PD .B \-\-junk\-qtn .br [Mac OS X] Ignore Mac OS X Quarantine ("com.apple.quarantine") extended attribute. Use "\fB\-Je\fP", to ignore this and all other extended attributes. Extended attribute processing is available on Mac OS X 10.4 and later. See also \fB\-J\fP, \fB\-Je\fP, \fB\-Jf\fP, and \fB\-Jr\fP. .PP .PD 0 .B \-Jr .TP .PD .B \-\-junk\-rsrc .br [Mac OS X] Ignore Mac OS Resource fork. See also \fB\-J\fP, \fB\-Je\fP, \fB\-Jf\fP, and \fB\-Jq\fP. .PP .PD 0 .B \-j[=depth] .TP .PD .B \-\-junk\-dirs[=depth] .br Junk directories on extracted files. With \fB\-j\fP, all directory information is stripped from an archive member name, so all files are extracted into the destination directory. (See also \fB\-d\fP and \fB\-da\fP.) .IP If a depth (\fB=depth\fP, where \fBdepth\fP is a positive integer) is specified, then that number of directory levels will be stripped from an archive member name. For example, an archive member like "a/b/c/d/ee.txt" would normally be extracted as "a/b/c/d/ee.txt". With \fB\-j\fP, it would be extracted as "ee.txt". With \fB\-j=2\fP, the first two directory levels would be stripped, so it would be extracted as "c/d/ee.txt". .PP .PD 0 .B \-\-jar .br Treat archive(s) as Java JAR. Over-simplification in Java JAR archives can cause \fIUnZip\fP to transform UTF-8 file names according to inappropriate (MS-DOS) rules, yielding corrupt names on extracted files (typically those with character codes 128-255). Archives containing a Java "CAFE" extra field should be detected automatically, and handled correctly, but not all JAR archives include that extra field. Specifying \-\-jar tells \fIUnZip\fP to expect UTF-8 file names, regardless of whether the archive contains a "CAFE" extra field. .PP .PD 0 .B \-K .TP .PD .B \-\-keep\-s\-attrs .br [AtheOS, BeOS, Unix] Retain SUID/SGID/Tacky permission bits. By default, these permission bits are cleared, for security reasons. .PP .PD 0 .B \-k .TP .PD .B \-\-keep\-permissions .br [AtheOS, BeOS, Unix, VMS] Control how archived permissions or protections are restored on extracted files and directories. .IP By default, archived permissions are restored with some limitations. On AtheOS, BeOS, and Unix, the current umask value is applied (to the normal user/group/other permissions). On VMS, the current default protection is applied to the UIC-based (SOGW) protections. .IP With \-k, the archived permissions are restored without regard to the Unix umask or VMS default protection. (This was the default behavior in \fIUnZip\fP versions before 6.1.) .IP With \-k\-, the archived permissions are ignored, so only the Unix umask or VMS default protection is effective. (On VMS, directories are always created without any Delete access.) .IP On AtheOS, BeOS, and Unix, the SUID/SGID/Tacky permission bits are controlled by the \-K/\-\-keep\-s\-attrs option, regardless of the \-k/\-\-keep\-permissions setting. .PP .PD 0 .B \-ka .TP .PD .B \-\-keep\-acl .br [VMS] Restore ACLs on extracted files and directories. .PP .PD 0 .B \-L .TP .PD .B \-\-lowercase\-names .br Convert to lowercase any filename originating on an uppercase-only operating system or file system. (This was \fIUnZip\fP's default behavior in versions before 5.11. The current default behavior is the same as the old behavior with the \fB\-U\fP option. \fB\-U\fP is now used for another purpose.) .IP Depending on the archiver, files archived from single-case file systems (old MS-DOS FAT, VMS ODS2, and so on) may be stored as all-uppercase names; this can be ugly or inconvenient when extracting to a case-preserving file system such as OS/2 HPFS or a case-sensitive one such as on Unix. By default \fIUnZip\fP lists and extracts such filenames exactly as they're stored (excepting truncation, conversion of unsupported characters, an so on). With \fB\-L\fP, the names of all files from certain systems will be converted to lowercase. With \fB\-LL\fP, all file names will be down-cased, regardless of the originating file system. .PP .PD 0 .B \-l .TP .PD .B \-\-list .br Primary Mode. List archive members. For details, see Primary Mode options. .PP .PD 0 .BR \-M "\ \ \ \ ([CMS,MVS] Or: " \-m ) .TP .PD .B \-\-more .br Pipe all output through an internal pager similar to the Unix \fImore\fP(1) command. At the end of a screenful of output, \fIUnZip\fP pauses with a "\-\-More\-\-" prompt; the next screenful may be viewed by pressing the Enter/Return key or the space bar. \fIUnZip\fP can be terminated by pressing the "Q" key and, on some systems, the Enter/Return key. Unlike Unix \fImore\fP(1), there is no forward-searching or editing capability. Also, \fIUnZip\fP doesn't notice if long lines wrap at the edge of the screen, effectively resulting in the printing of two or more lines and the likelihood that some text will scroll off the top of the screen before being viewed. If the actual number of lines on the screen can not be determined, 24 lines will be assumed. .PP .PD 0 .B \-N .TP .PD .B \-\-comment\-to\-note .br [Amiga] Extract member comments as Amiga filenotes. Member comments are created with the \-c option of \fIZip\fP, or with the \-N option of the Amiga port of \fIZip\fP, which stores filenotes as comments. .PP .PD 0 .B \-n .TP .PD .B \-\-never\-overwrite .br When extracting, never overwrite existing files. If a file already exists, then skip the extraction of that file without asking. See also \-o (\-\-overwrite). .IP By default, \fIUnZip\fP queries the user before extracting any file that already exists. The user may choose to overwrite only the current file, overwrite all files, skip extraction of the current file, skip extraction of all existing files, or rename the current file (choose a new name for the extracted file). .IP [VMS] On VMS, the usual query choices are to create a new version of an existing file, to skip extraction, or to rename the current file. In the case where an archive member name includes a version number, and \-V ("retain VMS file version numbers") is in effect, then an additional query choice is offered: to overwrite the existing file. .PP .PD 0 .B \-O char_set .TP .PD .B \-\-oem\-char\-set char_set .br [Unix] Select OEM character set \fIchar_set\fP. See also \-0 and \-I. .PP .PD 0 .B \-o .TP .PD .B \-\-overwrite .br When extracting, always overwrite existing files without prompting. This is a \fIdangerous\fP option, so use it with care. (It is often used with \fB\-f\fP, however, and is the only way to overwrite directory EAs on OS/2.) See also \-n (\-\-never-overwrite). .IP By default, \fIUnZip\fP queries the user before extracting any file that already exists. .IP [Non-VMS] On non-VMS systems, the user may choose to overwrite only the current file, overwrite all files, skip extraction of the current file, skip extraction of all existing files, or rename the current file (choose a new name for the extracted file). .IP [VMS] On VMS, the usual query choices are to create a new version of an existing file, to skip extraction, or to rename the current file. In the case where an archive member name includes a version number, and \-V ("retain VMS file version numbers") is in effect, then an additional query choice is offered: to overwrite the existing file. In this case, \-o selects the "new version" choice, and \-oo (or "\-o \-o") selects the "overwrite" choice. .PP .PD 0 .B \-P password .TP .PD .B \-\-password password .br Use \fIpassword\fP to decrypt encrypted archive members (if any). \fITHIS IS INSECURE!\fP Many multi-user operating systems provide ways for any user to see the current command line of any other user. Even on stand-alone systems, there is always the threat of over-the-shoulder peeking. Storing the plaintext password as part of a command line in an automated script can be even less secure, Whenever possible, use the non-echoing, interactive prompt to enter passwords. Where security is truly important, use a strong encryption method, such as AES, instead of the relatively weak encryption provided by Traditional ZIP encryption. Or, use an external encryption program, such as GnuPG, before archiving the file. (Note that \fIZip\fP will probably not be able to do significant compression on a file which has already been encrypted.) .PP .PD 0 .B \-p .TP .PD .B \-\-pipe\-to\-stdout .br Primary Mode. Extract files to stdout (pipe). For details, see Primary Mode options. .PP .PD 0 .B \-q .TP .PD .B \-\-quiet .br Perform operations quietly. (\fB\-qq\fP: even more quietly). By default, \fIUnZip\fP prints the names of the files it's extracting or testing, the extraction methods, any member or archive comments that may be stored in the archive, and possibly a summary when finished with each archive. The \fB\-q\fP[\fBq\fP] options suppress the printing of some or all of these messages. .PP .PD 0 .B \-r .TP .PD .B \-\-remove\-exts .br [Tandem] Remove file extensions. .PP .PD 0 .B \-S .TP .PD .B \-\-streamlf .br [VMS] Use Stream_LF record format when converting extracted text files (\fB\-a\fP, \fB\-aa\fP), instead of the text-file default, variable-length record format. .IP [VMS] On VMS, for archives with VMS attribute information (made with "zip\ \-V" or "ZIP\ /VMS"), files are always created with their original record formats. For archives without VMS attribute information (not made with "zip\ \-V" or "ZIP\ /VMS"), all files are normally created with Stream_LF record format. With \fB\-a\fP, text files are normally created with variable-length record format, but adding \fB\-S\fP gives them Stream_LF record format. With \fB\-aa\fP, all files are treated as text files. See also \fB\-a\fP and \fB\-b\fP. .PP .PD 0 .B \-s .TP .PD .B \-\-space\-to\-uscore .br Convert spaces in filenames to underscores. Normally, on a system which allows spaces in filenames, \fIUnZip\fP extracts filenames with spaces intact (for example, "\fCEA\ DATA.\ SF\fR"). Working with such file names can be awkward, however, so \fB\-s\fP can be used to replace spaces with underscores. .PP .PD 0 .B \-sc .TP .PD .B \-\-show\-command .br Show processed command line (options, arguments), and then exit. .IP Strictly speaking this is a primary-mode option, but it's intended for use in program development, not for normal use. .PP .PD 0 .B \-si .TP .PD .B \-\-show\-pid .br [Non-VMS] Show the \fIUnZip\fP program's process ID (pid) before performing any other work. This value can then be used in a "kill \-USR1 pid" command to trigger a user-triggered progress report. .PP .PD 0 .B \-so .TP .PD .B \-\-show\-options .br Display all valid program options, then exit. .IP Strictly speaking this is a primary-mode option, but it's intended for use in program development, not for normal use. .PP .PD 0 .B \-T .TP .PD .B \-\-timestamp\-new .br Primary Mode. Set the timestamp on the archive(s) to that of the newest file in each one. For details, see Primary Mode options. .PP .PD 0 .B \-t .TP .PD .B \-\-test .br Primary Mode. Test archive members. For details, see Primary Mode options. .PP .PD 0 .B \-U .TP .PD .B \-\-unicode .br [UNICODE_SUPPORT] Control UTF-8 handling. When UNICODE_SUPPORT is available, \fB\-U\fP forces \fIUnZip\fP to escape all non-ASCII characters from UTF-8 coded filenames as "#Uxxxx' (for UCS-2 characters, or "#Lxxxxxx" for Unicode codepoints needing 3 octets). This option is provided mainly for debugging, when the fairly new UTF-8 support is suspected of mangling extracted filenames. .IP \fB\-UU\fP disables the recognition of UTF-8 encoded filenames. The handling of filename codings within \fIUnZip\fP falls back to the behavior of pre-Unicode versions. .IP [old, obsolete usage] Leave filenames uppercase if created on MS-DOS, VMS, and so on. See \fB\-L\fP. .PP .PD 0 .B \-u .TP .PD .B \-\-update .br Primary mode. Update existing files and create new ones if needed. For details, see Primary Mode options. .PP .PD 0 .B \-V .TP .PD .B \-\-keep\-versions .br [Non-CMS-MVS] Retain VMS file version numbers. VMS files can be stored with a version number, in the format "\fCfile.type;##\fR", where "##" is a positive decimal number. By default VMS "\fC;##\fR" version numbers are stripped, but this option allows them to be retained. (On file systems that limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.) .IP [Non-VMS] Note that before \fIUnZip\fP version 6.1, on a non-VMS system, a file with a name like "\fCfred;123\fR" would, by default, be extracted as "\fCfred\fR", even if the file did not originate on a VMS system (so that "\fC;123\fR" was probably not really a VMS version number). Beginning with UnZip version 6.1, the default behavior is to strip VMS version numbers only from files which were archived on a VMS system. To restore the old behavior, and always strip apparent VMS version numbers, explicitly negate the option: \fB\-V\-\fP. .IP [VMS] Note that on VMS, \fB\-V\fP affects \fIonly\fP version numbers, and is \fInot\fP needed to restore VMS file attributes. \fBZip\fP's \fB\-V\fP (\fB/VMS\fP) option is required to \fIstore\fP VMS attributes in an archive. If that was done when an archive was created, then \fBUnZip\fP will always \fIrestore\fP those attributes when a file is extracted. .PP .PD 0 .B \-v .TP .PD .B \-\-verbose .br When used with some primary mode option, \fB\-v\fP can make output more verbose. See also Primary Mode options, and \fB\-l\fP in particular. .IP Note: If only \fB\-v\fP (\fB\-\-verbose\fP) is specified with an archive name, then \fIUnZip\fP acts as if "\fB\-l\fP \fB\-v\fP" were specified, and a detailed listing is generated. .PP .PD 0 .B \-\-version .TP .PD Primary Mode. Display the program version, build options, and relevant environment variables. For details, see Primary Mode options. .PP .PD 0 .B \-vq .TP .PD .B \-\-quick-version .br Primary mode. Display a brief (one-line) program version report. .PP .PD 0 .B \-W .TP .PD .B \-\-wild\-no\-span .br [WILD_STOP_AT_DIR] (Valid when the program was built with the C macro WILD_STOP_AT_DIR defined.) By default, the wildcard characters "?" (single-character wildcard) and "*" (multi-character wildcard) match any character in a member path/name. "\fC\-W\fR" modifies the pattern-matching behavior for archive members so that both "?" (single-character wildcard) and "*" (multi-character wildcard) do not match the directory separator character "/". (The two-character sequence "**" acts as a multi-character wildcard that includes the directory separator in its matched characters.) For example, with "\fC\-W\fR": .PP .EX "*.c" matches "foo.c" but not "mydir/foo.c" "**.c" matches both "foo.c" and "mydir/foo.c" "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" "??*/*" matches "ab/foo" and "abc/foo" but not "a/foo" or "a/b/foo" .EE .IP This modified behavior is equivalent to the pattern matching style used by the shells of some of \fIUnZip\fP's supported target OSs (one example is Acorn RISC OS). This option may not be available on systems where the Zip archive's internal directory separator character "/" is allowed as regular character in native operating system filenames. .IP [non-VMS] Currently, \fIUnZip\fP uses the same pattern matching rules for both wildcard archive file name specifications and archive member selection patterns on most system types. For systems allowing "/" as regular filename character, the \-W option would not work as expected on a wildcard file name specification. .PP .PD 0 .B \-X .TP .PD .B \-\-restore\-owner .br [NT, OS/2, Unix, VMS, Tandem] Restore owner info (user and group info (UID/GID) on Unix, UIC on VMS, or access control lists (ACLs) on certain network-enabled versions of OS/2 (Warp Server with IBM LAN Server/Requester 3.0 to 5.0; Warp Connect with IBM Peer 1.0), or security ACLs on Windows NT.) In most cases this will require special system privileges, and doubling the option (\fB\-XX\fP) on NT instructs \fIUnZip\fP to use privileges for extraction; but on Unix, for example, a user who belongs to several groups can restore files owned by any of those groups, so long as the user IDs match the user's own. Note that ordinary file attributes are always restored. This option applies only to optional, extra ownership info available on some operating systems. (NT's access control lists do not appear to be especially compatible with OS/2's, so no attempt is made at cross-platform portability of access privileges. It is not clear under which conditions this would ever be useful anyway.) .PP .PD 0 .BR "\-x member" " ..." .TP .PD .BR "\-\-exclude member" " ..." .br An optional list of archive members to be excluded from processing. Because wildcard characters normally match "/" directory separators (for exceptions, see the option \fB\-W\fP), this option may be used to exclude any files that are in subdirectories. For example, "\fCunzip\ foo\ *.[ch]\ \-x\ */*\fR" would extract all C source files (*.c, *.h) in the main directory, but none in any subdirectories. Without the \fB\-x\fP option, all C source files in all directories within the archive would be extracted. .IP When the program sees \fB\-x\fP (\fB\-\-exclude\fP) on a command line, it stops scanning for options, and treats every succeeding item as an archive member name. To avoid confusion between member names and command options, it's simplest to specify \fB\-x\fP (\fB\-\-exclude\fP) and its member list as the \fIlast\fP items on a command line. Alternatively, the special name "@" can be used to terminate the member list (and cause the program to resume scanning for options). That is, the following two commands are equivalent: .EX unzip fred.zip -b -x file1 file2 file3 unzip fred.zip -x file1 file2 file3 @ -b .EE .PP .PD 0 .B \-Y .TP .PD .B \-\-dot\-version .br [VMS] Treat archive member name endings of ".nnn" (where "nnn" is a decimal number) as if they were VMS version numbers (";nnn"). (The default is to treat them as file types.) For example: .EX "a.b.3" -> "a.b;3" .EE .PP .PD 0 .B \-Z .TP .PD .B \-\-zipinfo\-mode .br \fIZipInfo\fP mode. If the first option on the command line is \fB\-Z\fP, then the program runs in \fIZipInfo\fP mode. Remaining options are interpreted as \fIZipInfo\fP options. See the \fBzipinfo\fP manual page for a description of those options. .PP .PD 0 .B \-z .TP .PD .B \-\-zipfile\-comment .br Primary mode. Display only the archive comment. For details, see Primary Mode options. .PP .PD 0 .B \-$ .TP .PD .B \-\-volume\-labels .br .\" [Amiga support possible eventually, but not yet.] [MS-DOS, NT, OS/2, VMS] Restore the volume label if the extraction medium is removable (for example, a diskette). Doubling the option (\fB\-$$\fP) allows fixed media (hard disks) to be labeled as well. By default, volume labels are ignored. .br [VMS] On VMS, a volume must be allocated, not shared, for a volume label to be set. .PP .PD 0 .B \-/ .TP .PD .B \-\-extensions .br [Acorn] Overrides the extension list supplied by the \fBUnzip$Ext\fP environment variable. During extraction, filename extensions that match one of the items in this extension list are swapped in front of the base name of the extracted file. .PP .PD 0 .B \-: .TP .PD .B \-\-do\-double\-dots .br [all but Acorn, VM/CMS, MVS, Tandem] Allows \fIUnZip\fP to extract archive members into locations outside of the current extraction destination directory (and its subdirectories). .IP For security reasons, \fIUnZip\fP normally removes "parent directory" path components ("../") from the path names of archive members as they are extracted. This safety feature (new for version 5.50) prevents \fIUnZip\fP from accidentally writing files to directories outside the current destination directory tree. The \fB\-:\fP option sets \fIUnZip\fP back to its previous, more liberal behavior, allowing exact extraction of archives that use "../" path components to create multiple directory trees at \fIor above\fP the level of the destination directory. .IP This option does not enable writing explicitly to the root directory ("/"). To achieve this, it is necessary to set the extraction target folder to "/" (by using an option like "\fB\-d\ /\fP"). However, when the \fB\-:\fP option is specified, it is still possible implicitly to write to the root directory if member paths specifying enough "../" path components. .IP \fIUse this option with extreme caution.\fP .PP .PD 0 .B \-^ .TP .PD .B \-\-control\-in\-name .br [Unix] Allow control characters in file names of extracted ZIP archive members. On Unix, a file name may contain any (8-bit) character code with the two exceptions of "/" (the directory delimiter) and NUL (0x00, the C string-termination character), unless the specific file system has more restrictive conventions. Generally, this allows embedding ASCII control characters or escape sequences in file names. However, this feature allows the use of malicious file names which can cause various kinds of bad trouble when displayed on a user's terminal/emulator. (Even a file name with unprintable but otherwise harmless characters can cause problems for users.) .IP For these reasons, by default, \fIUnZip\fP applies a filter that removes potentially dangerous control characters from the extracted file names. The \fB\-^\fP option overrides this filter in the rare case that embedded filename dangerous control characters are to be intentionally restored. .PP .\" ========================================================================= .SH "ENVIRONMENT OPTIONS" \fIUnZip\fP's default behavior may be modified by placing command-line options in an environment variable. This can be done with any option, but it is probably most useful options like \fB\-a\fP (auto-convert text files), \fB\-L\fP (downcase file names from systems with all uppercase file names), \fB\-C\fP (use case-insensitive name matching), \fB\-q\fP (quiet), \fB\-o\fP (always overwrite), or \fB\-n\fP (never overwrite). .IP For \fIUnZip\fP, the environment variable name is UNZIP, except on VMS, where it's UNZIP_OPTS (to avoid conflict with a foreign-command DCL symbol, UNZIP). For similarity with \fIZip\fP, if UNZIP (UNZIP_OPTS on VMS) is not defined, then \fIUnZip\fP will use UNZIPOPT the same way. .IP For \fIZipInfo\fP ("\fCunzip -Z\fR"), the environment variable name is ZIPINFO, except on VMS, where it's ZIPINFO_OPTS. For similarity with \fIZip\fP, if ZIPINFO (ZIPINFO_OPTS on VMS) is not defined, then \fIZipInfo\fP will use ZIPINFOOPT the same way. .IP For example, to make \fIUnZip\fP act as quietly as possible, only reporting errors, one could use commands like the following: .TP Unix Bourne (or similar) shell: UNZIP='\-q\ \-q'; export UNZIP .TP Unix C shell: setenv\ UNZIP\ '\-q\ \-q' .TP OS/2 or MS-DOS: set\ UNZIP="\-q\ \-q" .TP VMS (with quotation to preserve lower case in DCL): define\ UNZIP_OPTS\ "\-q\ \-q" ! Logical name, or .br UNZIP_OPTS\ =\ "\-q\ \-q" ! DCL symbol. (Either works.) .IP Environment options are treated the same as any other command-line options, except that they are effectively the first options on the command line. To override an environment option, one may use an explicit option to cancel or override it. For example, to override one of the "quiet" flags in the example above, use a command like: .EX unzip\ \-q\-\ [\fIother\ options\fP]\ archive.zip .EE .IP The leading hyphen is the normal option character, and the trailing one negates the option, canceling one level of quietness. To cancel multiple "quiet" flags, use multiple \fB\-q\-\fP options: .PP .EX unzip\ \-t\ \-q\-\ \-q\-\ archive unzip\ \-q\-\ \-q\-\ \-t\ archive .EE .IP Note that multiple one-character options like "\-q" and "\-q" can be combined into a single "\-qq", but it's generally clearer to keep each instance of each option separate. Similarly, negated one-character options can be combined, as with "\-q\-q\-", but "\-q\-\ \-q\-" is generally clearer. .IP The examples show short (one-character) options, but long ("\-\-") options are also allowed. .PP The timezone variable (TZ) should be set according to the local timezone in order for the Freshen (\fB\-f\fP) and Update (\fB\-u\fP) modes to operate correctly. For details, see \fB\-f\fP. This variable may also be necessary to get timestamps of extracted files to be set correctly. .IP On Windows systems, \fIUnZip\fP gets the timezone configuration from the registry, assuming it is correctly set in the Control Panel. The TZ variable is ignored on these systems. .PP .\" ========================================================================= .SH ENCRYPTION/DECRYPTION \fIZip\fP and \fIUnZip\fP have long supported a relatively weak encryption method, which we call Traditional ZIP encryption. The source code for Traditional encryption is included in the source kits, and support for Traditional encryption is enabled by default. .PP The Info-ZIP programs \fIUnZip\fP (version 6.1 and later) and \fIZip\fP (version 3.1 and later)include optional support for Advanced Encryption Standard (AES) encryption, a relatively strong encryption method. .TP The Info-ZIP AES implementation is based on the \fIWinZip\fP AES specification, and uses AES encryption code supplied by Brian Gladman. We refer to it as IZ_AES_WG (Info-ZIP AES WinZip/Gladman) or simply AES_WG. (\fIWinZip\fP is a registered trademark of WinZip International LLC.) The source code for AES_WG encryption is included in the normal UnZip source kit, and support for it will be enabled by default. .TP The WinZip AES scheme is described in: http://www.winzip.com/aes_info.htm .TP For information on the IZ_AES_WG source code, see: aes_wg/README_AES_WG.txt .br or: .br ftp://ftp.info-zip.org/pub/infozip/crypt/README_AES_WG.txt .TP See the INSTALL file in the source kit for details on how to disable AES_WG encryption (or how to disable Traditional encryption). .PP Normally, encryption passwords are supplied by the user interactively when requested by the program. See the \fB\-P\fP option for a (less secure) method of specifying a password on the command line. .PP With Traditional encryption, when decrypting, a password will be checked against header data, and used if it appears to be correct. The correct password will always check out against the header data, but there is a 1-in-256 chance that an incorrect password will as well. (This is a security feature of the PKWARE archive format; it helps prevent brute-force attacks that might otherwise gain a large speed advantage by testing only the header.) In the case that an incorrect password is given but it passes the header test anyway, either an incorrect CRC will be generated for the extracted data or else \fIUnZip\fP will fail during the extraction because the "decrypted" bytes do not constitute a valid compressed data stream. .PP If the first password fails the header check on some file, \fIUnZip\fP will prompt for another password, and so on until all files are extracted. If a password is not known, entering a null password (that is, just a carriage return or "Enter") is taken as a signal to skip all further prompting. Only unencrypted files in the archive(s) will thereafter be extracted. (The situation is actually a little more complicated. Some old versions of \fIZip\fP and \fIZipCloak\fP allowed null passwords, so \fIUnZip\fP checks each encrypted file to see if the null password works. This may result in "false positives" and extraction errors, as noted above.) .PP Archives encrypted with 8-bit-character passwords (for example, passwords with accented European characters) may not be portable across systems or to other archivers. This problem stems from the use of multiple encoding methods for such characters, including Latin-1 (ISO 8859-1) and OEM code page 850. DOS \fIPKZIP\fP 2.04g uses the OEM code page; Windows \fIPKZIP\fP 2.50 uses Latin-1 (and is therefore incompatible with DOS \fIPKZIP\fP); Info-ZIP uses the OEM code page on DOS, OS/2 and Win3.x ports but ISO coding (Latin-1 etc.) everywhere else; and Nico Mak's \fIWinZip\fP 6.x does not allow 8-bit-character passwords at all. \fIUnZip\fP 5.3 (or newer) attempts to use the default character set first (e.g., Latin-1), followed by the alternate one (e.g., OEM code page) to test passwords. On EBCDIC systems, if both of these fail, EBCDIC encoding will be tested as a last resort. (EBCDIC is not tested on non-EBCDIC systems, because there are no known archivers that encrypt using EBCDIC encoding.) ISO character encodings other than Latin-1 are not supported. The new addition of (partial) Unicode (UTF-8) support in \fIUnZip\fP 6.0 has not yet been adapted to the encryption password handling in \fIUnZip\fP. On systems that use UTF-8 as native character encoding, \fIUnZip\fP simply tries decryption with the native UTF-8 encoded password; the built-in attempts to check the password in translated encoding have not yet been adapted for UTF-8 support and will consequently fail. .PP .\" ========================================================================= .SH EXAMPLES To use \fIUnZip\fP to extract all members of the archive \fIletters.zip\fP into the current directory and subdirectories below it, creating any subdirectories as necessary: .PP .EX unzip letters .EE .PP To extract all members of \fIletters.zip\fP into the current directory only: .PP .EX unzip \-j letters .EE .PP To test \fIletters.zip\fP, printing only a summary message indicating whether the archive is OK or not: .PP .EX unzip \-t \-q letters .EE .PP To test \fIall\fP ".zip" archives in the current directory, printing only the summaries: .PP .EX unzip \-t \-q "*.zip" .EE .PP Here, the wildcard archive name was quoted to keep a Unix shell from expanding ("globbing") it. (This would not be necessary on VMS.) .PP The following command extracts to standard output all members of \fIletters.zip\fP whose names end in \fI\.tex\fP, auto-converting to the local end-of-line convention, and piping the output into \fImore\fP(1) (again, quoting the wildcard member name pattern): .PP .EX unzip \-c \-a letters '*.tex' | more .EE .PP To extract the binary file \fIpaper1.dvi\fP to standard output and pipe it to a printing program: .PP .EX unzip \-p articles paper1.dvi | dvips .EE .PP To extract from \fIsource.zip\fP all Fortran and C source files (*.f, *.c, *.h) and Makefile into the /tmp directory (again, quoting the wildcard): .PP .EX unzip source.zip "*.[fch]" Makefile \-d /tmp .EE .PP To extract all FORTRAN and C source files, regardless of case (for example, both *.c and *.C, and any makefile, Makefile, MAKEFILE or similar): .PP .EX unzip \-C source.zip "*.[fch]" makefile \-d /tmp .EE .PP To extract any such files but convert any uppercase MS-DOS or VMS names to lowercase and convert the line-endings of all of the files to the local standard (without respect to any files that might be marked "binary"): .PP .EX unzip \-aa \-C \-L source.zip "*.[fch]" makefile \-d /tmp .EE .PP The following command extracts only newer versions of the files already in the current directory, without querying. (Note: Be careful of extracting in one timezone an archive created in another. ZIP archives created by \fIZip\fP versions before 2.1 contain no timezone information, and a "newer" file from an eastern timezone may, in fact, be older): .PP .EX unzip \-f \-o sources .EE .PP To extract newer versions of the files already in the current directory and to create any files not already there (same caveat as previous example): .PP .EX unzip \-u \-o sources .EE .PP To display a configuration report showing the program version, the OS and compiler used to build it, a list of optional features enabled at build time, and the values of all the relevant environment variables: .PP .EX unzip \-v .EE .PP In the last five examples, assume that UNZIP or UNZIP_OPTS is set to \-q. To do a (singly) quiet listing: .PP .EX unzip \-l file.zip .EE .PP To do a doubly quiet listing: .PP .EX unzip \-l \-q file.zip .EE .PP (Note that the "\fC\.zip\fR" is generally not necessary.) To do a standard listing: .PP .EX unzip \-l \-q\- file.zip .EE or: .EX unzip \-lq\- file.zip .EE or: .EX unzip \-q\-l file.zip .EE .PP .\" ========================================================================= .SH "EXIT STATUS" The exit status (or error level) approximates the exit codes defined by PKWARE and takes on the following values (except on VMS): .RS .IP 0 Normal. No errors or warnings detected. .IP 1 One or more warnings were encountered, but processing completed successfully. This includes archives where one or more (but not all) files were skipped because of an unsupported compression or encryption method, or a bad encryption password. .IP 2 Error in the archive format. Processing may or may not have completed successfully. .IP 3 Severe error in the archive format. Processing probably failed immediately. .IP 4 Memory allocation failed in program initialization. .IP 5 Memory allocation or terminal I/O failed in encryption password processing. .IP 6 Memory allocation failed while decompressing to disk. .IP 7 Memory allocation failed while decompressing in memory. .IP 8 Memory allocation failed. (Currently not used.) .IP 9 Specified archive files were not found. .IP 10 Invalid command-line options or parameters. .IP 11 No matching files were found. .IP 50 Disk (file system) filled during extraction. .IP 51 Unexpected end-of-file while reading the archive. .IP 80 User interrupt (Ctrl/C or similar). .IP 81 No files were processed, because of unsupported compression or encryption methods. .IP 82 No files were processed, because of bad encryption password(s). .IP 83 Large-file archive could not be processed by this small-file program. .IP 84 Failed to create automatic extraction directory. (Already exists?) .RE .PP [VMS] On VMS, the standard Unix exit status values are translated into valid VMS status codes. For details, see the file [.vms]NOTES.TXT in the source kit. .PP .\" ========================================================================= .SH BUGS Multi-part archives are not yet supported, except in conjunction with \fIZip\fP. (All parts must be concatenated together in order, and then "\fCzip\ \-F\fR" (for Zip 2.x) or "\fCzip\ \-FF\fR" (for Zip 3.x) must be performed on the concatenated archive in order to "fix" it. Also, \fIzip\fP version 3.0 and later can combine multi-part (split) archives into a combined single-file archive using "\fCzip\ \-s\-\ inarchive\ \-O\ outarchive\fR". See the \fIzip\fP manual page for more information.) This may be corrected in the next major release. .PP Archives read from standard input are not yet supported, except with \fIfUnZip\fP (and then only the first member of the archive can be extracted). .PP Archives encrypted with 8-bit-character passwords (such as passwords with accented European characters) may not be portable across systems and/or other archivers. See also \fBENCRYPTION/DECRYPTION\fP. .PP \fIUnZip\fP's \fB\-M\fP ("\-\-more") option tries to take into account automatic wrapping of long lines. However, the code may fail to detect the correct wrapping locations. First, TAB characters (and similar control sequences) are not taken into account, they are handled as ordinary printable characters. Second, depending on the actual system type, \fIUnZip\fP may not detect the true terminal/emulator geometry, but instead may rely on "commonly used" default dimensions. The correct handling of tabs would require the implementation of a query for the actual tab setup on the output terminal/emulator. .PP [Unix] Unix special files such as FIFO buffers (named pipes), block devices and character devices are not restored even if they are somehow represented in the archive, nor are hard-linked files relinked. Basically, the only file types restored by \fIUnZip\fP are regular files, directories, and symbolic (soft) links. .PP [OS/2] Extended attributes for existing directories are only updated if the \fB\-o\fP ("overwrite all") option is given. This is a limitation of the operating system; because directories only have a creation time associated with them, \fIUnZip\fP has no way to determine whether the stored attributes are newer or older than those on disk. In practice this may mean a two-pass approach is required: first unpack the archive normally (with or without freshening/updating existing files), then overwrite just the directory entries (for example, "\fCunzip\ \-o\ foo\ */\fR"). .PP .\" ========================================================================= .\" Oracle has added the ARC stability level to this manual page .SH ATTRIBUTES See .BR attributes (7) for descriptions of the following attributes: .sp .TS box; cbp-1 | cbp-1 l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE = Availability compress/unzip = Stability Volatile .TE .PP .SH "SEE ALSO" \fIfunzip\fP(1L), \fIunzipsfx\fP(1L), \fIzip\fP(1L), \fIzipcloak\fP(1L), .br \fIzipgrep\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L) .PP .\" ========================================================================= .SH URL .TP The Info-ZIP main Web page is: .EX \fChttp://www.info-zip.org/\fR .EE .TP FTP access is available, too: .EX \fCftp://ftp.info-zip.org/pub/infozip/\fR .EE .PP .\" ========================================================================= .SH AUTHORS The primary Info-ZIP authors (current semi-active members of the Zip-Bugs workgroup) are: Ed Gordon (Zip, general maintenance, shared code, Zip64, Win32, Unix, Unicode); Christian Spieler (VMS, MS-DOS, Win32, shared code, general Zip and \fIUnZip\fP integration and optimization); Onno van der Linden (Zip); Mike White (Win32, Windows GUI, Windows DLLs); Kai Uwe Rommel (OS/2, Win32); Steven M. Schweda (\fIUnZip\fP maintenance, VMS, Unix, support of new features); Paul Kienitz (Amiga, Win32, Unicode); Chris Herborth (BeOS, QNX, Atari); Jonathan Hudson (SMS/QDOS); Sergio Monesi (Acorn RISC OS); Harald Denker (Atari, MVS); John Bush (Solaris, Amiga); Hunter Goatley (VMS, Info-ZIP server maintenance); Steve Salisbury (Win32); Steve Miller (Windows CE GUI), Johnny Lee (MS-DOS, Win32, Zip64); and Dave Smith (Tandem NSK). .PP The following people are former members of the Info-ZIP development group, and provided major contributions to key parts of the current code: Greg "Cave Newt" Roelofs (\fIUnZip\fP, unshrink decompression); Jean-loup Gailly (deflate compression); Mark Adler (inflate decompression, \fIfUnZip\fP). .PP The author of the original unzip code upon which Info-ZIP's was based is Samuel H. Smith; Carl Mascott did the first Unix port; and David P. Kirschbaum organized and led Info-ZIP in its early days with Keith Petersen hosting the original mailing list at WSMR-SimTel20. The full list of contributors to \fIUnZip\fP has grown quite large; please refer to the proginfo/CONTRIBS file in the \fIUnZip\fP source distribution for a relatively complete version. .PP .\" ========================================================================= .SH NOTES .\" Oracle has added source availability information to this manual page Source code for open source software components in Oracle Solaris can be found at https://www.oracle.com/downloads/opensource/solaris-source-code-downloads.html. This software was built from source available at https://github.com/oracle/solaris-userland. The original community source was downloaded from http://antinode.info/ftp/info-zip/unzip610c25.zip. Further information about this software can be found on the open source community website at http://www.info-zip.org/UnZip.html.