📄 unzip.doc
字号:
-V retain (VMS) file version numbers. VMS files can be stored with a version number, in the format file.ext;##. By default the ``;##'' version numbers are stripped, but this option allows them to be retained. (On filesystems which limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.) -X [VMS] restore owner/protection info (may require system privileges). Ordinary file attributes are always restored, but this option allows UICs to be restored as well. [The next version of unzip will support Unix UID/GID info as well, and possibly NT permissions.] -$ [MS-DOS, OS/2, NT, Amiga] restore the volume label if the extraction medium is removable (e.g., a diskette). Doubling the option (-$$) allows fixed media (hard disks) to be labelled as well. By default, volume labels are ignored.ENVIRONMENT OPTIONS unzip's default behavior may be modified via options placed in an environment variable. This can be done with any option, but it is probably most useful with the -q, -a, -o, or -n modifiers: make unzip quieter by default, make it auto-convert text files, or make it always overwrite or never overwrite files as it extracts them. For example, to make unzip act as quietly as possible, only reporting errors, one would use one of the following commands: UNZIP=-qq; export UNZIP Unix Bourne shell setenv UNZIP -qq Unix C shell set UNZIP=-qq OS/2 or MS-DOS define UNZIP_OPTS "-qq" VMS (quotes for lowercase) Environment options are, in effect, considered to be just like any other command-line options, except that they are effectively the first options on the command line. To over- ride an environment option, one may use the ``minus opera- tor'' to remove it. For instance, to override one of the quiet-flags in the example above, use the command unzip --q[other options] zipfile The first hyphen is the normal switch character, and the second is a minus sign, acting on the q option. Thus the effect here is to cancel one quantum of quietness. To can- cel both quiet flags, two (or more) minuses may be used: unzip -t--q zipfile unzip ---qt zipfile (the two are equivalent). This may seem awkward or confus- ing, but it is reasonably intuitive: just ignore the first hyphen and go from there. It is also consistent with the behavior of Unix nice(1).EXAMPLES To use unzip to extract all members of the archive letters.zip into the current directory and subdirectories below it, creating any subdirectories as necessary: unzip letters To extract all members of letters.zip into the current directory only: unzip -j letters To test letters.zip, printing only a summary message indi- cating whether the archive is OK or not: unzip -tq letters To extract to standard output all members of letters.zip whose names end in .tex, auto-converting to the local end- of-line convention and piping the output into more(1): unzip -ca letters \*.tex | more (The backslash before the asterisk is only required if the shell expands wildcards, as in Unix; double quotes could have been used instead, as in the source example below.) To extract the binary file paper1.dvi to standard output and pipe it to a printing program: unzip -p articles paper1.dvi | dvips To extract all FORTRAN and C source files--*.f, *.c, *.h, and Makefile--into the /tmp directory: unzip source.zip "*.[fch]" Makefile -d /tmp (the double quotes are necessary only in Unix and only if globbing is turned on). To extract only newer versions of the files already in the current directory, without querying (NOTE: be careful of unzipping in one timezone a zipfile created in another--ZIP archives to date contain no timezone information, and a ``newer'' file from an eastern timezone may, in fact, be older): unzip -fo sources 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): unzip -uo sources In the last five examples, assume that UNZIP or UNZIP_OPTS is set to -q. To do a singly quiet listing: unzip -l file To do a doubly quiet listing: unzip -ql file To do a standard listing: unzip --ql file or unzip -l-q file or unzip -l--q file (extra minuses don't hurt)TIPS The current maintainer, being a lazy sort, finds it very useful to define a pair of aliases: tt for ``unzip -tq'' and ii for ``unzip -Z'' (or ``zipinfo''). One may then sim- ply type ``tt zipfile'' to test an archive, something which is worth making a habit of doing. With luck unzip will report ``No errors detected in zipfile.zip,'' after which one may breathe a sigh of relief.BUGS [MS-DOS] When extracting or testing files from an archive on a defective floppy diskette, if the ``Fail'' option is chosen from DOS's ``Abort, Retry, Fail?'' message, unzip may hang the system, requiring a reboot. Instead, press control-C (or control-Break) to terminate unzip. Under DEC Ultrix, unzip will sometimes fail on long zipfiles (bad CRC, not always reproducible). This is apparently due either to a hardware bug (cache memory) or an operating sys- tem bug (improper handling of page faults?). Dates and times of stored directories are not restored. [OS/2] Extended attributes for existing directories are never updated. This is a limitation of the operating sys- tem; unzip has no way to determine whether the stored attri- butes are newer or older than the existing ones. [VMS] When extracting to another directory, only the [.foo] syntax is accepted for the -d option; the simple Unix foo syntax is silently ignored (as is the less common VMS foo.dir syntax). [VMS] When the file being extracted already exists, unzip's query only allows skipping, overwriting or renaming; there should additionally be a choice for creating a new version of the file. In fact, the ``overwrite'' choice does create a new version; the old version is not overwritten or deleted.SEE ALSO funzip(1L), zip(1L), zipcloak(1L), zipgrep(1L), zipinfo(1L), zipnote(1L), zipsplit(1L)AUTHORS The primary Info-ZIP authors (current zip-bugs workgroup) are: Jean-loup Gailly (Zip), Greg R. Roelofs (UnZip), Mark Adler (decompression, fUnZip), Kai Uwe Rommel (OS/2), Igor Mandrichenko (VMS), John Bush and Paul Kienitz (Amiga), Antoine Verheijen (Macintosh), Chris Herborth (Atari), Henry Gessau (NT), and Robert Heath (Windows). The author of the original unzip code upon which Info-ZIP's is based was Samuel H. Smith; Carl Mascott did the first Unix port; and David P. Kirschbaum organized and led Info-ZIP in its early days. The full list of contributors to UnZip has grown quite large; please refer to the CONTRIBS file in the UnZip source distribution for a more complete list.VERSIONS v1.2 15 Mar 89 Samuel H. Smith v2.0 9 Sep 89 Samuel H. Smith v2.x fall 1989 many Usenet contributors v3.0 1 May 90 Info-ZIP (DPK, consolidator) v3.1 15 Aug 90 Info-ZIP (DPK, consolidator) v4.0 1 Dec 90 Info-ZIP (GRR, maintainer) v4.1 12 May 91 Info-ZIP v4.2 20 Mar 92 Info-ZIP (zip-bugs subgroup; GRR, maint.) v5.0 21 Aug 92 Info-ZIP (zip-bugs subgroup; GRR, maint.) v5.1 7 Feb 94 Info-ZIP (zip-bugs subgroup; GRR, maint.)Info-ZIP Last change: 7 Feb 94 v5.1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -