Home Explore Blog CI



man-pages

1st chunk of `unzip.man`
71dee2cc284c45373621024f0beb4dde315dddaa8bd0a1340000000100000fdc
UNZIP(1)                    General Commands Manual                    UNZIP(1)

NAME
       unzip - list, test and extract compressed files in a ZIP archive

SYNOPSIS
       unzip  [-Z]  [-cflptTuvz[abjnoqsCDKLMUVWX$/:^]] 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(1), 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 op‐
       tions or default behaviors differ.

ARGUMENTS
       file[.zip]
              Path of the ZIP archive(s).  If the file specification is a wild‐
              card,  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 those supported in commonly used Unix shells (sh, ksh,
              csh) 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 brack‐
                     ets  is  considered  a match).  To specify a verbatim left
                     bracket, the three‐character sequence ‘‘[[]’’  has  to  be
                     used.

              (Be  sure  to  quote any character that might otherwise be inter‐
              preted or modified by the operating  system,  particularly  under
              Unix and VMS.)  If no matches are found, the specification is as‐
              sumed  to be a literal filename; and if that also fails, the suf‐
              fix .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.

       [file(s)]
              An optional list of archive members to be processed, separated by
              spaces.  (VMS versions compiled with VMSCLI defined must  delimit
              files  with  commas  instead.  See -v in OPTIONS below.)  Regular
              expressions (wildcards) may be used to  match  multiple  members;
              see above.  Again, be sure to quote expressions that would other‐
              wise be expanded or modified by the operating system.

       [-x xfile(s)]
              An  optional list of archive members to be excluded from process‐
              ing.  Since wildcard characters normally  match  (‘/’)  directory
              separators (for exceptions see the option -W), this option may be
              used  to exclude any files that are in subdirectories.  For exam‐
              ple, ‘‘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 recreated in the current  directory;
              the -d option allows extraction in an arbitrary directory (always
              assuming one has permission

Title: UNZIP: Extracting Files from ZIP Archives
Summary
The `unzip` command is used to list, test, or extract files from ZIP archives, commonly found on MS-DOS systems. The default behavior extracts all files into the current directory. You can specify the ZIP archive, files to include, files to exclude, and the destination directory. Wildcards are supported for file specifications. It is compatible with ZIP archives created by PKWARE's PKZIP and PKUNZIP.