home *** CD-ROM | disk | FTP | other *** search
-
- UNZIP(1) USER COMMANDS UNZIP(1)
-
- NAME
- unzip - list/test/extract from a ZIP archive file
-
- SYNOPSIS
- unzip [ -cflptuvxz[ajnoqUV] ] file[.zip] [filespec ...]
-
- ARGUMENTS
- file[.zip] Path of the ZIP archive. The suffix ``.zip'' is
- applied if the file specified does not exist.
- Note that self-extracting ZIP files are sup-
- ported; just specify the ``.exe'' suffix your-
- self.
-
- [filespec] An optional list of archive members to be pro-
- cessed. Expressions may be used to match multi-
- ple members; be sure to quote expressions that
- contain characters interpreted by the operating
- system. See DESCRIPTION (below) for more
- details.
-
- OPTIONS
- -c extract files to stdout/screen (``CRT'')
- -f freshen existing files (replace if newer); create none
- -l list archive files (short format)
- -p extract files to pipe; no informational messages
- -t test archive files
- -u update existing files; create new ones if needed
- -v list archive files (verbose format)
- -x extract files in archive (default)
- -z display only the archive comment
-
- MODIFIERS
- -a convert to MS-DOS textfile format (CR LF), Mac format
- (CR), Unix/VMS format (LF), OR from ASCII to EBCDIC,
- depending on your system (only use for TEXT files!)
- -j junk paths (don't recreate archive's directory struc-
- ture)
- -n never overwrite existing files; don't prompt
- -o OK to overwrite files without prompting
- -q perform operations quietly (-qq => even quieter)
- -s [OS/2, MS-DOS] allow spaces in filenames (e.g.,
- ``EA DATA. SF'')
- -U leave filenames uppercase if created under MS-DOS, VMS,
- etc.
- -V retain (VMS) file version numbers
- -X [VMS] restore owner/protection info (may require
- privileges)
-
- DESCRIPTION
- UnZip will list, test, or extract from a ZIP archive, com-
- monly found on MSDOS systems. Archive member extraction is
- implied by the absence of the -c, -p, -t, -l, -v or -z
-
- Info-ZIP Last change: 22 Aug 92 (v5.0) 1
-
- UNZIP(1) USER COMMANDS UNZIP(1)
-
- options. All archive members are processed unless a
- filespec is provided to specify a subset of the archive
- members. The filespec is similar to an egrep expression,
- and may contain:
-
- * matches a sequence of 0 or more characters
- ? matches exactly 1 character
- \nnn matches the character having octal code nnn
- [...] matches any single character found inside the brack-
- ets; ranges are specified by a beginning character, a
- hyphen, and an ending character. If an exclamation
- point or a carat (`!' or `^') follows the left
- bracket, then the range of characters matched is com-
- plemented with respect to the ASCII character set
- (that is, anything except the characters inside the
- brackets is considered a match).
-
- 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, -o, or
- -n modifiers: in order to make UnZip quieter by default, or
- to 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:
-
- setenv UNZIP -qq Unix C shell
-
- UNZIP=-qq; export UNZIP Unix Bourne 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 a single quantum of quietness. To
- cancel both quiet flags, two (or more) minuses may be used:
-
- unzip -x--q zipfile
-
- Info-ZIP Last change: 22 Aug 92 (v5.0) 2
-
- UNZIP(1) USER COMMANDS UNZIP(1)
-
- or
-
- unzip ---qx 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, creating any directories as necessary:
-
- unzip letters
-
- To extract all members of letters.zip to the current direc-
- tory:
-
- 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'', 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,
- Makefile (the double quotes are necessary only in Unix and
- only if globbing is turned on):
-
- unzip source.zip "*.[fch]" Makefile
-
- 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 contain no timezone information, and a ``newer''
- file from an eastern timezone may, in fact, be older):
-
- Info-ZIP Last change: 22 Aug 92 (v5.0) 3
-
- UNZIP(1) USER COMMANDS UNZIP(1)
-
- 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 an alias ``tt'' for ``unzip -tq''. One may
- then simply type ``tt zipfile'' to test the archive, some-
- thing which one ought make a habit of doing. With luck
- UnZip will report ``No errors detected in zipfile.zip,''
- after which one may breathe a sigh of relief.
-
- SEE ALSO
- funzip(1), zip(1), zipcloak(1), zipinfo(1), zipnote(1),
- zipsplit(1)
-
- AUTHORS
- Samuel H. Smith, Carl Mascott, David P. Kirschbaum, Greg R.
- Roelofs, Mark Adler, Kai Uwe Rommel, Igor Mandrichenko,
- Johnny Lee, Jean-loup Gailly; Glenn Andrews, Joel Aycock,
- Allan Bjorklund, James Birdsall, Wim Bonner, John Cowan,
- Frank da Cruz, Bill Davidsen, Arjan de Vet, James Dugal, Jim
- Dumser, Mark Edwards, David Feinleib, Mike Freeman, Hunter
- Goatley, Robert Heath, Dave Heiland, Larry Jones, Kjetil
- J(o)rgenson, Bob Kemp, J. Kercheval, Alvin Koh, Bo Kullmar,
-
- Info-ZIP Last change: 22 Aug 92 (v5.0) 4
-
- UNZIP(1) USER COMMANDS UNZIP(1)
-
- Johnny Lee, Warner Losh, Fulvio Marino, Gene McManus, Joe
- Meadows, Mike O'Carroll, Humberto Ortiz-Zuazaga, Piet W.
- Plomp, Antonio Querubin Jr., Steve Salisbury, Georg Sassen,
- Jon Saxton, Hugh Schmidt, Martin Schulz, Charles Scripter,
- Chris Seaman, Richard Seay, Alex Sergejew, Cliff Stanford,
- Onno van der Linden, Jim Van Zandt, Antoine Verheijen, Paul
- Wells.
-
- 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.)
-
- Info-ZIP Last change: 22 Aug 92 (v5.0) 5
-
-