Home Explore Blog CI



man-pages

12th chunk of `unzip.man`
15c1d81e5ee7165cf4ffa99b1ab3ce3368ec777f2e8d98cb0000000100000fdd
 the destination file
              system, preserving case and extended file name characters  on  an
              ODS5 destination file system; and applying the ODS2‐compatibility
              file name filtering on an ODS2 destination file system.

ENVIRONMENT OPTIONS
       unzip’s  default behavior may be modified via options placed in an envi‐
       ronment variable.  This can be done with any option, but it is  probably
       most  useful  with  the -a, -L, -C, -q, -o, or -n modifiers:  make unzip
       auto‐convert text files by default, make it convert filenames  from  up‐
       percase  systems  to  lowercase, make it match names case‐insensitively,
       make it quieter, or make it always overwrite or never overwrite files as
       it extracts them.  For example, to make unzip act as quietly  as  possi‐
       ble, only reporting errors, one would use one of the following commands:

         Unix Bourne shell:
              UNZIP=-qq; export UNZIP

         Unix C shell:
              setenv UNZIP -qq

         OS/2 or MS‐DOS:
              set UNZIP=-qq

         VMS (quotes for lowercase):
              define UNZIP_OPTS "-qq"

       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 override an environment option, one may use the
       ‘‘minus  operator’’  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 mi‐
       nus sign, acting on the q option.  Thus the effect here is to cancel one
       quantum of quietness.  To cancel 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 confusing, 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).

       As  suggested  by the examples above, the default variable names are UN‐
       ZIP_OPTS for VMS (where the symbol used to install unzip  as  a  foreign
       command  would otherwise be confused with the environment variable), and
       UNZIP for all other operating systems.  For compatibility  with  zip(1),
       UNZIPOPT  is  also accepted (don’t ask).  If both UNZIP and UNZIPOPT are
       defined, however, UNZIP takes precedence.  unzip’s diagnostic option (-v
       with no zipfile name) can be used to check the values of all four possi‐
       ble unzip and zipinfo environment variables.

       The timezone variable (TZ) should be set according to the local timezone
       in order for the -f and -u to operate correctly.  See the description of
       -f above for details.  This variable may also be necessary to get  time‐
       stamps   of   extracted   files   to   be   set  correctly.   The  WIN32
       (Win9x/ME/NT4/2K/XP/2K3) port of unzip gets the  timezone  configuration
       from  the  registry,  assuming it is correctly set in the Control Panel.
       The TZ variable is ignored for this port.

DECRYPTION
       Encrypted archives are fully supported by Info‐ZIP software, but due  to
       United  States export restrictions, de‐/encryption support might be dis‐
       abled in your compiled binary.  However, since spring  2000,  US  export
       restrictions have been liberated, and our source archives do now include
       full  crypt code.  In case you need binary distributions with crypt sup‐
       port enabled, see the file ‘‘WHERE’’ in any Info‐ZIP  source  or  binary
       distribution for locations both inside and outside the US.

       Some  compiled versions of unzip may not support decryption.  To check a
       version for crypt support, either attempt to  test  or  extract  an  en‐
       crypted

Title: UNZIP Environment Options, Overriding Options, and Timezone Variable
Summary
UNZIP's default behavior can be modified via options placed in an environment variable, particularly useful for modifiers like -a, -L, -C, -q, -o, or -n. Examples are provided for setting the UNZIP variable in Unix Bourne shell, Unix C shell, OS/2 or MS-DOS, and VMS. Environment options are treated as the first options on the command line, and can be overridden using the minus operator. The timezone variable (TZ) should be set for -f and -u options to work correctly, but the WIN32 port gets timezone from the registry. Decryption is supported by Info-ZIP software, but may be disabled due to export restrictions.