Home Explore Blog CI



man-pages

3rd chunk of `unzip.man`
71f68924d727dca7ba6ad90d86c264c0cf51b3c70778192f0000000100000fe5
 the -o option may
              be used to suppress the queries.  Note that under many  operating
              systems,  the TZ (timezone) environment variable must be set cor‐
              rectly 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 differences between DOS‐
              format file times (always local time) and Unix‐format times  (al‐
              ways in GMT/UTC) and the necessity to compare the two.  A typical
              TZ  value  is ‘‘PST8PDT’’ (US Pacific time with automatic adjust‐
              ment 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 individual 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 extracted in binary for‐
              mat, just as they are stored (no conversions).

       -t     test archive files.  This option extracts each specified file  in
              memory and compares the CRC (cyclic redundancy check, an enhanced
              checksum)  of  the  expanded file with the original file’s stored
              CRC value.

       -T     [most OSes] set the timestamp on the archive(s) to  that  of  the
              newest  file  in  each one.  This corresponds to zip’s -go option
              except that it can be used on wildcard zipfiles (e.g., ‘‘unzip -T
              \*.zip’’) and is much faster.

       -u     update existing files and create new ones if needed.  This option
              performs the same function as the  -f  option,  extracting  (with
              query)  files  that  are  newer  than those with the same name on
              disk, and in addition it extracts those files that do not already
              exist on disk.  See -f above for information on setting the time‐
              zone properly.

       -v     list archive files (verbose format) or  show  diagnostic  version
              info.   This option has evolved and now behaves as both an option
              and a modifier.  As an option it has two purposes:  when  a  zip‐
              file  is  specified with no other options, -v lists archive files
              verbosely, adding to the basic -l info  the  compression  method,
              compressed  size,  compression ratio and 32‐bit CRC.  In contrast
              to most of the competing utilities, unzip removes  the  12  addi‐
              tional header bytes of encrypted entries from the compressed size
              numbers.   Therefore,  compressed size and compression ratio fig‐
              ures are independent of the entry’s encryption  status  and  show
              the  correct  compression performance.  (The complete size of the
              encrypted compressed data stream for zipfile entries is  reported
              by the more verbose zipinfo(1) reports, see the separate manual.)
              When  no  zipfile  is specified (that is, the complete command is
              simply ‘‘unzip -v’’), a diagnostic screen is printed.   In  addi‐
              tion  to  the  normal header with release date and version, unzip

Title: UNZIP Options (Continued)
Summary
This section continues detailing the various options available with the `unzip` command. It explains how to list archive files in short format (-l), extract files to stdout (-p), test archive files for integrity (-t), update archive timestamps (-T), update existing files and create new ones (-u), and list archive files in verbose format or show diagnostic version info (-v). It highlights how -v provides detailed compression information and how unzip handles encrypted entries in size calculations.