home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ANews 2
/
AnewsCD2.iso
/
Indispensables
/
Compression
/
UnZip_v5.32
/
Docs
/
unzip.doc
< prev
next >
Wrap
Text File
|
1999-10-04
|
45KB
|
910 lines
UNZIP(1L) UNZIP(1L)
NAME
unzip - list, test and extract compressed files in a ZIP
archive
SYNOPSIS
unzip [-Z] [-cflptuvz[abjnoqsCLMVX$]] file[.zip]
[file(s) ...] [-x xfile(s) ...] [-d exdir]
DESCRIPTION
unzip will list, test, or extract files from a ZIP
archive, commonly found on MS-DOS 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, zip(1L), cre-
ates ZIP archives; both programs are compatible with
archives created by PKWARE's PKZIP and PKUNZIP for MS-DOS,
but in many cases the program options or default behaviors
differ.
ARGUMENTS
file[.zip]
Path of the ZIP archive(s). If the file specifica-
tion is a wildcard, each matching file is processed
in an order determined by the operating system (or
file system). Only the filename can be a wildcard;
the path itself cannot. Wildcard expressions are
similar to Unix egrep(1) (regular) expressions and
may contain:
* matches a sequence of 0 or more characters
? matches exactly 1 character
[...] 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 (`!' or `^') follows the left bracket,
then the range of characters within the
brackets is complemented (that is, anything
except the characters inside the brackets is
considered a match).
(Be sure to quote any character that might other-
wise be interpreted or modified by the operating
system, particularly under Unix and VMS.) If no
matches are found, the specification is assumed to
be a literal filename; and if that also fails, the
suffix .zip is appended. Note that self-extracting
ZIP files are supported, as with any other ZIP
archive; just specify the .exe suffix (if any)
explicitly.
Info-ZIP 3 November 1997 (v5.32) 1
UNZIP(1L) UNZIP(1L)
[file(s)]
An optional list of archive members to be pro-
cessed, separated by spaces. (VMS versions com-
piled with VMSCLI defined must delimit files with
commas instead. See -v in OPTIONS below.) Regular
expressions (wildcards) may be used to match multi-
ple members; see above. Again, be sure to quote
expressions that would otherwise be expanded or
modified by the operating system.
[-x xfile(s)]
An optional list of archive members to be excluded
from processing. Since wildcard characters match
directory separators (`/'), this option may be used
to exclude any files that are in subdirectories.
For example, ``unzip foo *.[ch] -x */*'' would
extract all C source files in the main directory,
but none in any subdirectories. Without the -x
option, all C source files in all directories
within the zipfile would be extracted.
[-d exdir]
An optional directory to which to extract files.
By default, all files and subdirectories are recre-
ated in the current directory; the -d option allows
extraction in an arbitrary directory (always assum-
ing one has permission to write to the directory).
This option need not appear at the end of the com-
mand line; it is also accepted before the zipfile
specification (with the normal options), immedi-
ately after the zipfile specification, or between
the file(s) and the -x option. The option and
directory may be concatenated without any white
space between them, but note that this may cause
normal shell behavior to be suppressed. In partic-
ular, ``-d ~'' (tilde) is expanded by Unix C shells
into the name of the user's home directory, but
``-d~'' is treated as a literal subdirectory ``~''
of the current directory.
OPTIONS
Note that, in order to support obsolescent hardware,
unzip's usage screen is limited to 22 or 23 lines and
should therefore be considered only a reminder of the
basic unzip syntax rather than an exhaustive list of all
possible flags. The exhaustive list follows:
-Z zipinfo(1L) mode. If the first option on the com-
mand line is -Z, the remaining options are taken to
be zipinfo(1L) options. See the appropriate manual
page for a description of these options.
-A [OS/2, Unix DLL] print extended help for the DLL's
programming interface (API).
Info-ZIP 3 November 1997 (v5.32) 2
UNZIP(1L) UNZIP(1L)
-c extract files to stdout/screen (``CRT''). This
option is similar to the -p option except that the
name of each file is printed as it is extracted,
the -a option is allowed, and ASCII-EBCDIC conver-
sion is automatically performed if appropriate.
This option is not listed in the unzip usage
screen.
-f freshen existing files, i.e., extract only those
files that already exist on disk and that are newer
than the disk copies. By default unzip queries
before overwriting, but the -o option may be used
to suppress the queries. Note that under many
operating systems, the TZ (timezone) environment
variable must be set correctly in order for -f and
-u to work properly (under Unix the variable is
usually set automatically). The reasons for this
are somewhat subtle but have to do with the differ-
ences between DOS-format file times (always local
time) and Unix-format times (always in GMT/UTC) and
the necessity to compare the two. A typical TZ
value is ``PST8PDT'' (US Pacific time with auto-
matic adjustment for Daylight Savings Time or
``summer time'').
-l list archive files (short format). The names,
uncompressed file sizes and modification dates and
times of the specified files are printed, along
with totals for all files specified. If UnZip was
compiled with OS2_EAS defined, the -l option also
lists columns for the sizes of stored OS/2 extended
attributes (EAs) and OS/2 access control lists
(ACLs). In addition, the zipfile comment and indi-
vidual file comments (if any) are displayed. If a
file was archived from a single-case file system
(for example, the old MS-DOS FAT file system) and
the -L option was given, the filename is converted
to lowercase and is prefixed with a caret (^).
-p extract files to pipe (stdout). Nothing but the
file data is sent to stdout, and the files are
always extracte