Linux "zipinfo" Command Line Options and Examples
list detailed information about a ZIP archive

zipinfo lists technical information about files in a ZIP archive, most commonly found on MS-DOS systems. Such information includes file access permissions, encryption status, type of compression, version and operating system or file system of compressing program, and the like.


Usage:

zipinfo [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]


    unzip -Z [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]






Command Line Options:

-s
list zipfile info in short Unix ``ls -l'' format. This is the default behavior; see below.
zipinfo -s ...
-v
list zipfile information in verbose, multi-page format.
zipinfo -v ...
-h
list header line. The archive name, actual size (in bytes) and total number of files is printed.
zipinfo -h ...
-U
[UNICODE_SUPPORT only] modify or disable UTF-8 handling. When UNICODE_SUPPORT is available, the option
zipinfo -U ...
-z
DETAILED DESCRIPTIONzipinfo has a number of modes, and its behavior can be rather difficult to fathom if one isn't familiar withUnix ls(1) (or even if one is). The default behavior is to list files in the following format:
zipinfo -z ...
-rw-rws---
The last three fields are the modification date and time of the file, and its name. The case of the filenameis respected; thus files that come from MS-DOS PKZIP are always capitalized. If the file was zipped with astored directory name, that is also displayed as part of the filename.The second and third fields indicate that the file was zipped under Unix with version 1.9 of zip. Since itcomes from Unix, the file permissions at the beginning of the line are printed in Unix format. The uncom‐pressed file-size (2802 in this example) is the fourth field.The fifth field consists of two characters, either of which may take on several values. The first charactermay be either `t' or `b', indicating that zip believes the file to be text or binary, respectively; but if thefile is encrypted, zipinfo notes this fact by capitalizing the character (`T' or `B'). The second charactermay also take on four values, depending on whether there is an extended local header and/or an ``extra field''associated with the file (fully explained in PKWare's APPNOTE.TXT, but basically analogous to pragmas in ANSI
zipinfo -rw-rws--- ...
-rw-a--
1.0 hpf 5358 Tl i4:3 4-Dec-91 11:33 longfilename.hpfs
zipinfo -rw-a-- ...
-r--ahs
1.1 fat 4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF
zipinfo -r--ahs ...
--w-------
File attributes in the first two cases are indicated in a Unix-like format, where the seven subfields indicatewhether the file: (1) is a directory, (2) is readable (always true), (3) is writable, (4) is executable(guessed on the basis of the extension--.exe, .com, .bat, .cmd and .btm files are assumed to be so), (5) hasits archive bit set, (6) is hidden, and (7) is a system file. Interpretation of Macintosh file attributes isunreliable because some Macintosh archivers don't store any attributes in the archive.Finally, the sixth field indicates the compression method and possible sub-method used. There are six methodsknown at present: storing (no compression), reducing, shrinking, imploding, tokenizing (never publiclyreleased), and deflating. In addition, there are four levels of reducing (1 through 4); four types of implod‐ing (4K or 8K sliding dictionary, and 2 or 3 Shannon-Fano trees); and four levels of deflating (superfast,fast, normal, maximum compression). zipinfo represents these methods and their sub-methods as follows: stor;re:1, re:2, etc.; shrk; i4:2, i8:3, etc.; tokn; and defS, defF, defN, and defX.The medium and long listings are almost identical to the short format except that they add information on thefile's compression. The medium format lists the file's compression factor as a percentage indicating theamount of space that has been ``removed'':
zipinfo --w------- ...