{
    "mode": "man",
    "parameter": "zipinfo",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/zipinfo/1/json",
    "generated": "2026-06-03T03:34:27Z",
    "synopsis": "zipinfo [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]\nunzip -Z [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]",
    "sections": {
        "NAME": {
            "content": "zipinfo - list detailed information about a ZIP archive\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "zipinfo [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]\n\nunzip -Z [-12smlvhMtTz] file[.zip] [file(s) ...] [-x xfile(s) ...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "zipinfo  lists technical information about files in a ZIP archive, most commonly found on MS-\nDOS systems.  Such information includes file access permissions, encryption status,  type  of\ncompression,  version  and  operating  system  or file system of compressing program, and the\nlike.  The default behavior (with no options) is to list single-line entries for each file in\nthe  archive,  with header and trailer lines providing summary information for the entire ar‐\nchive.  The format is a cross between Unix ``ls -l'' and ``unzip -v'' output.   See  DETAILED\nDESCRIPTION  below.   Note  that  zipinfo is the same program as unzip (under Unix, a link to\nit); on some systems, however, zipinfo support may have been omitted when unzip was compiled.\n",
            "subsections": []
        },
        "ARGUMENTS": {
            "content": "file[.zip]\nPath of the ZIP archive(s).  If the file specification is a  wildcard,  each  matching\nfile  is  processed  in  an order determined by the operating system (or file system).\nOnly the filename can be a wildcard; the path itself cannot.  Wildcard expressions are\nsimilar to Unix egrep(1) (regular) expressions and may contain:\n\n*      matches a sequence of 0 or more characters\n\n?      matches exactly 1 character\n\n[...]  matches any single character found inside the brackets; ranges are specified by\na beginning character, a hyphen, and an ending character.   If  an  exclamation\npoint or a caret (`!' or `^') follows the left bracket, then the range of char‐\nacters within the brackets is complemented (that is, anything except the  char‐\nacters  inside the brackets is considered a match).  To specify a verbatim left\nbracket, the three-character sequence ``[[]'' has to be used.\n\n(Be sure to quote any character that might otherwise be interpreted or modified by the\noperating  system,  particularly  under  Unix  and VMS.)  If no matches are found, the\nspecification is assumed to be a literal filename; and if that also fails, the  suffix\n.zip  is  appended.   Note  that  self-extracting ZIP files are supported, as with any\nother ZIP archive; just specify the .exe suffix (if any) explicitly.\n\n[file(s)]\nAn optional list of archive members to be processed, separated by spaces.   (VMS  ver‐\nsions  compiled  with VMSCLI defined must delimit files with commas instead.)  Regular\nexpressions (wildcards) may be used to match multiple members; see above.   Again,  be\nsure  to quote expressions that would otherwise be expanded or modified by the operat‐\ning system.\n\n[-x xfile(s)]\nAn optional list of archive members to be excluded from processing.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-1",
                    "content": "and zipfile comments are never printed.  It is intended for use in Unix shell scripts.\n",
                    "flag": "-1"
                },
                {
                    "name": "-2 -h -t",
                    "content": "comments (-z), as well.  This option may be useful in cases where the stored filenames\nare particularly long.\n",
                    "flag": "-t"
                },
                {
                    "name": "-s",
                    "content": "below.\n",
                    "flag": "-s"
                },
                {
                    "name": "-m -s",
                    "content": "that the compression factor, expressed as a percentage, is also listed.\n",
                    "flag": "-s"
                },
                {
                    "name": "-l -m",
                    "content": "pressed size (in bytes) is printed instead of the compression ratio.\n",
                    "flag": "-m"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "-h",
                    "content": "is printed.\n",
                    "flag": "-h"
                },
                {
                    "name": "-M",
                    "content": "end of a screenful of output, zipinfo pauses with  a  ``--More--''  prompt;  the  next\nscreenful  may be viewed by pressing the Enter (Return) key or the space bar.  zipinfo\ncan be terminated by pressing the ``q'' key and, on  some  systems,  the  Enter/Return\nkey.  Unlike Unix more(1), there is no forward-searching or editing capability.  Also,\nzipinfo doesn't notice if long lines wrap at the edge of the screen,  effectively  re‐\nsulting  in  the  printing of two or more lines and the likelihood that some text will\nscroll off the top of the screen before being viewed.  On some systems the  number  of\navailable  lines  on  the  screen  is  not detected, in which case zipinfo assumes the\nheight is 24 lines.\n",
                    "flag": "-M"
                },
                {
                    "name": "-t",
                    "content": "compressed  and  compressed  total  sizes  ,  and  their overall compression factor is\nprinted; or, if only the totals line is being printed, the values for the  entire  ar‐\nchive  are given.  The compressed total size does not include the 12 additional header\nbytes of each encrypted entry. Note that the total compressed (data) size  will  never\nmatch  the  actual zipfile size, since the latter includes all of the internal zipfile\nheaders in addition to the compressed data.\n",
                    "flag": "-t"
                },
                {
                    "name": "-T",
                    "content": "fault  date  format  is a more standard, human-readable version with abbreviated month\nnames (see examples below).\n",
                    "flag": "-T"
                },
                {
                    "name": "-U",
                    "content": "available,  the  option  -U forces unzip to escape all non-ASCII characters from UTF-8\ncoded filenames as ``#Uxxxx''.  This option is mainly provided for  debugging  purpose\nwhen the fairly new UTF-8 support is suspected to mangle up extracted filenames.\n\nThe  option -UU allows to entirely disable the recognition of UTF-8 encoded filenames.\nThe handling of filename codings within unzip falls back to the behaviour of  previous\nversions.\n",
                    "flag": "-U"
                },
                {
                    "name": "-z",
                    "content": "",
                    "flag": "-z"
                }
            ]
        },
        "DETAILED DESCRIPTION": {
            "content": "zipinfo  has  a  number  of  modes, and its behavior can be rather difficult to fathom if one\nisn't familiar with Unix ls(1) (or even if one is).  The default behavior is to list files in\nthe following format:\n\n-rw-rws---  1.9 unx    2802 t- defX 11-Aug-91 13:48 perms.2660\n\nThe last three fields are the modification date and time of the file, and its name.  The case\nof the filename is respected; thus files that come from MS-DOS PKZIP are always  capitalized.\nIf  the  file  was zipped with a stored directory name, that is also displayed as part of the\nfilename.\n\nThe second and third fields indicate that the file was zipped under Unix with version 1.9  of\nzip.  Since it comes from Unix, the file permissions at the beginning of the line are printed\nin Unix format.  The uncompressed file-size (2802 in this example) is the fourth field.\n\nThe fifth field consists of two characters, either of which may take on several values.   The\nfirst character may be either `t' or `b', indicating that zip believes the file to be text or\nbinary, respectively; but if the file is encrypted, zipinfo notes this fact  by  capitalizing\nthe  character (`T' or `B').  The second character may also take on four values, depending on\nwhether there is an extended local header and/or an ``extra field'' associated with the  file\n(fully explained in PKWare's APPNOTE.TXT, but basically analogous to pragmas in ANSI C--i.e.,\nthey provide a standard way to include non-standard information in the archive).  If  neither\nexists, the character will be a hyphen (`-'); if there is an extended local header but no ex‐\ntra field, `l'; if the reverse, `x'; and if both exist, `X'.  Thus the file in  this  example\nis  (probably)  a text file, is not encrypted, and has neither an extra field nor an extended\nlocal header associated with it.  The example below, on the other hand, is an  encrypted  bi‐\nnary file with an extra field:\n\nRWD,R,R     0.9 vms     168 Bx shrk  9-Aug-91 19:15 perms.0644\n\nExtra  fields are used for various purposes (see discussion of the -v option below) including\nthe storage of VMS file attributes, which is presumably the case here.  Note  that  the  file\nattributes  are listed in VMS format.  Some other possibilities for the host operating system\n(which is actually a misnomer--host file system is more correct) include OS/2 or NT with High\nPerformance File System (HPFS), MS-DOS, OS/2 or NT with File Allocation Table (FAT) file sys‐\ntem, and Macintosh.  These are denoted as follows:\n\n-rw-a--     1.0 hpf    5358 Tl i4:3  4-Dec-91 11:33 longfilename.hpfs\n-r--ahs     1.1 fat    4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF\n--w-------  1.0 mac   17357 bx i8:2  4-May-92 04:02 unzip.macr\n\nFile attributes in the first two cases are indicated in a Unix-like format, where  the  seven\nsubfields  indicate whether the file:  (1) is a directory, (2) is readable (always true), (3)\nis writable, (4) is executable (guessed on the basis of the extension--.exe, .com, .bat, .cmd\nand  .btm files are assumed to be so), (5) has its archive bit set, (6) is hidden, and (7) is\na system file.  Interpretation of Macintosh file attributes is unreliable because some Macin‐\ntosh archivers don't store any attributes in the archive.\n\nFinally,  the  sixth  field  indicates  the  compression method and possible sub-method used.\nThere are six methods known at present:  storing (no compression), reducing,  shrinking,  im‐\nploding,  tokenizing  (never  publicly released), and deflating.  In addition, there are four\nlevels of reducing (1 through 4); four types of imploding (4K or 8K sliding dictionary, and 2\nor 3 Shannon-Fano trees); and four levels of deflating (superfast, fast, normal, maximum com‐\npression).  zipinfo represents these methods and their sub-methods as follows:   stor;  re:1,\nre:2, etc.; shrk; i4:2, i8:3, etc.; tokn; and defS, defF, defN, and defX.\n\nThe  medium  and  long listings are almost identical to the short format except that they add\ninformation on the file's compression.  The medium format lists the file's compression factor\nas a percentage indicating the amount of space that has been ``removed'':\n\n-rw-rws---  1.5 unx    2802 t- 81% defX 11-Aug-91 13:48 perms.2660\n\nIn  this  example, the file has been compressed by more than a factor of five; the compressed\ndata are only 19% of the original size.  The long format gives the compressed file's size  in\nbytes, instead:\n\n-rw-rws---  1.5 unx    2802 t-     538 defX 11-Aug-91 13:48 perms.2660\n\nIn  contrast to the unzip listings, the compressed size figures in this listing format denote\nthe complete size of compressed data, including the 12 extra header  bytes  in  case  of  en‐\ncrypted entries.\n\nAdding the -T option changes the file date and time to decimal format:\n\n-rw-rws---  1.5 unx    2802 t-     538 defX 910811.134804 perms.2660\n\nNote  that  because of limitations in the MS-DOS format used to store file times, the seconds\nfield is always rounded to the nearest even second.  For  Unix  files  this  is  expected  to\nchange in the next major releases of zip(1) and unzip.\n\nIn  addition  to  individual file information, a default zipfile listing also includes header\nand trailer lines:\n",
            "subsections": [
                {
                    "name": "Archive:  OS2.zip   5453 bytes   5 files",
                    "content": ",,rw,       1.0 hpf     730 b- i4:3 26-Jun-92 23:40 Contents\n,,rw,       1.0 hpf    3710 b- i4:3 26-Jun-92 23:33 makefile.os2\n,,rw,       1.0 hpf    8753 b- i8:3 26-Jun-92 15:29 os2unzip.c\n,,rw,       1.0 hpf      98 b- stor 21-Aug-91 15:34 unzip.def\n,,rw,       1.0 hpf      95 b- stor 21-Aug-91 17:51 zipinfo.def\n5 files, 13386 bytes uncompressed, 4951 bytes compressed:  63.0%\n\nThe header line gives the name of the archive, its total size, and the total number of files;\nthe  trailer gives the number of files listed, their total uncompressed size, and their total\ncompressed size (not including any of zip's internal overhead).  If,  however,  one  or  more\nfile(s)  are  provided,  the  header and trailer lines are not listed.  This behavior is also\nsimilar to that of Unix's ``ls -l''; it may be overridden by specifying the -h and -t options\nexplicitly.  In such a case the listing format must also be specified explicitly, since -h or"
                },
                {
                    "name": "-t",
                    "content": "both)  is listed.  See the EXAMPLES section below for a semi-intelligible translation of this\nnonsense.\n\nThe verbose listing is mostly self-explanatory.  It also lists file comments and the  zipfile\ncomment,  if  any,  and  the  type and number of bytes in any stored extra fields.  Currently\nknown types of extra fields include PKWARE's authentication (``AV'') info; OS/2 extended  at‐\ntributes;  VMS  filesystem info, both PKWARE and Info-ZIP versions; Macintosh resource forks;\nAcorn/Archimedes SparkFS info; and so on.  (Note that  in  the  case  of  OS/2  extended  at‐\ntributes--perhaps  the most common use of zipfile extra fields--the size of the stored EAs as\nreported by zipinfo may not match the number given by OS/2's dir command: OS/2 always reports\nthe  number  of  bytes  required  in 16-bit format, whereas zipinfo always reports the 32-bit\nstorage.)\n\nAgain, the compressed size figures of the individual entries  include  the  12  extra  header\nbytes  for encrypted entries.  In contrast, the archive total compressed size and the average\ncompression ratio shown in the summary bottom line are calculated without the extra 12 header\nbytes of encrypted entries.\n",
                    "flag": "-t"
                }
            ]
        },
        "ENVIRONMENT OPTIONS": {
            "content": "Modifying  zipinfo's  default behavior via options placed in an environment variable can be a\nbit complicated to explain, due to zipinfo's attempts to handle various defaults in an  intu‐\nitive,  yet  Unix-like,  manner.  (Try not to laugh.)  Nevertheless, there is some underlying\nlogic.  In brief, there are three ``priority levels'' of options:  the default options; envi‐\nronment options, which can override or add to the defaults; and explicit options given by the\nuser, which can override or add to either of the above.\n\nThe default listing format, as noted above, corresponds roughly to the \"zipinfo -hst\" command\n(except  when individual zipfile members are specified).  A user who prefers the long-listing\nformat (-l) can make use of the zipinfo's environment variable to change this default:\n\nUnix Bourne shell:\nZIPINFO=-l; export ZIPINFO\n\nUnix C shell:\nsetenv ZIPINFO -l\n\nOS/2 or MS-DOS:\nset ZIPINFO=-l\n\nVMS (quotes for lowercase):\ndefine ZIPINFOOPTS \"-l\"\n\nIf, in addition, the user dislikes the trailer line,  zipinfo's  concept  of  ``negative  op‐\ntions''  may  be used to override the default inclusion of the line.  This is accomplished by\npreceding the undesired option with one or more minuses:  e.g., ``-l-t'' or ``--tl'', in this\nexample.   The  first hyphen is the regular switch character, but the one before the `t' is a\nminus sign.  The dual use of hyphens may seem a little awkward, but it's reasonably intuitive\nnonetheless:   simply  ignore the first hyphen and go from there.  It is also consistent with\nthe behavior of the Unix command nice(1).\n\nAs suggested above, the default variable names are ZIPINFOOPTS for  VMS  (where  the  symbol\nused to install zipinfo as a foreign command would otherwise be confused with the environment\nvariable), and ZIPINFO for all other operating systems.  For compatibility with zip(1),  ZIP‐\nINFOOPT  is  also accepted (don't ask).  If both ZIPINFO and ZIPINFOOPT are defined, however,\nZIPINFO takes precedence.  unzip's diagnostic option (-v with no zipfile name) can be used to\ncheck the values of all four possible unzip and zipinfo environment variables.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To  get  a basic, short-format listing of the complete contents of a ZIP archive storage.zip,\nwith both header and totals lines, use only the archive name as an argument to zipinfo:\n\nzipinfo storage\n\nTo produce a basic, long-format listing (not verbose), including header and totals lines, use",
            "subsections": [
                {
                    "name": "-l",
                    "content": "zipinfo -l storage\n\nTo  list  the complete contents of the archive without header and totals lines, either negate\nthe -h and -t options or else specify the contents explicitly:\n\nzipinfo --h-t storage\nzipinfo storage \\*\n\n(where the backslash is required only if the shell would otherwise expand the  `*'  wildcard,\nas in Unix when globbing is turned on--double quotes around the asterisk would have worked as\nwell).  To turn off the totals line by default, use the environment variable (C shell is  as‐\nsumed here):\n\nsetenv ZIPINFO --t\nzipinfo storage\n\nTo  get the full, short-format listing of the first example again, given that the environment\nvariable is set as in the previous example, it is necessary to specify the -s option  explic‐\nitly, since the -t option by itself implies that ONLY the footer line is to be printed:\n\nsetenv ZIPINFO --t\nzipinfo -t storage            [only totals line]\nzipinfo -st storage           [full listing]\n\nThe  -s  option,  like  -m  and -l, includes headers and footers by default, unless otherwise\nspecified.  Since the environment variable specified no footers and that has a higher  prece‐\ndence  than  the  default  behavior of -s, an explicit -t option was necessary to produce the\nfull listing.  Nothing was indicated about the header, however, so the -s option  was  suffi‐\ncient.   Note  that  both  the -h and -t options, when used by themselves or with each other,\noverride any default listing of member files; only the  header  and/or  footer  are  printed.\nThis  behavior is useful when zipinfo is used with a wildcard zipfile specification; the con‐\ntents of all zipfiles are then summarized with a single command.\n\nTo list information on a single file within the archive, in medium format, specify the  file‐\nname explicitly:\n\nzipinfo -m storage unshrink.c\n\nThe  specification  of  any member file, as in this example, will override the default header\nand totals lines; only the single line of  information  about  the  requested  file  will  be\nprinted.   This is intuitively what one would expect when requesting information about a sin‐\ngle file.  For multiple files, it is often useful to know the  total  compressed  and  uncom‐\npressed size; in such cases -t may be specified explicitly:\n\nzipinfo -mt storage \"*.[ch]\" Mak\\*\n\nTo get maximal information about the ZIP archive, use the verbose option.  It is usually wise\nto pipe the output into a filter such as Unix more(1) if the operating system allows it:\n\nzipinfo -v storage | more\n\nFinally, to see the most recently modified files in the archive, use the -T  option  in  con‐\njunction  with  an external sorting utility such as Unix sort(1) (and sed(1) as well, in this\nexample):\n\nzipinfo -T storage | sort -nr -k 7 | sed 15q\n\nThe -nr option to sort(1) tells it to sort numerically in reverse order rather than  in  tex‐\ntual  order, and the -k 7 option tells it to sort on the seventh field.  This assumes the de‐\nfault short-listing format; if -m or -l is used, the proper sort(1)  option  would  be  -k 8.\nOlder versions of sort(1) do not support the -k option, but you can use the traditional + op‐\ntion instead, e.g., +6 instead of -k 7.  The sed(1) command filters out all but the first  15\nlines  of  the  listing.   Future  releases of zipinfo may incorporate date/time and filename\nsorting as built-in options.\n",
                    "flag": "-l"
                }
            ]
        },
        "TIPS": {
            "content": "The author finds it convenient to define an alias  ii  for  zipinfo  on  systems  that  allow\naliases  (or, on other systems, copy/rename the executable, create a link or create a command\nfile with the name ii).  The ii usage parallels the common ll  alias  for  long  listings  in\nUnix, and the similarity between the outputs of the two commands was intentional.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "As  with unzip, zipinfo's -M (``more'') option is overly simplistic in its handling of screen\noutput; as noted above, it fails to detect the wrapping of long lines and may  thereby  cause\nlines  at  the top of the screen to be scrolled off before being read.  zipinfo should detect\nand treat each occurrence of line-wrap as one additional line printed.  This requires  knowl‐\nedge  of  the  screen's  width as well as its height.  In addition, zipinfo should detect the\ntrue screen geometry on all systems.\n\nzipinfo's listing-format behavior is unnecessarily complex and should be  simplified.   (This\nis not to say that it will be.)\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ls(1), funzip(1), unzip(1), unzipsfx(1), zip(1), zipcloak(1), zipnote(1), zipsplit(1)\n",
            "subsections": []
        },
        "URL": {
            "content": "The Info-ZIP home page is currently at\nhttp://www.info-zip.org/pub/infozip/\nor\nftp://ftp.info-zip.org/pub/infozip/ .\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Greg  ``Cave  Newt''  Roelofs.   ZipInfo  contains  pattern-matching  code  by Mark Adler and\nfixes/improvements by many others.  Please refer to the CONTRIBS file  in  the  UnZip  source\ndistribution for a more complete list.\n\n\n\nInfo-ZIP                                20 April 2009 (v3.0)                              ZIPINFO(1)",
            "subsections": []
        }
    },
    "summary": "zipinfo - list detailed information about a ZIP archive",
    "flags": [
        {
            "flag": "-1",
            "long": null,
            "arg": null,
            "description": "and zipfile comments are never printed. It is intended for use in Unix shell scripts."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "comments (-z), as well. This option may be useful in cases where the stored filenames are particularly long."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "below."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "that the compression factor, expressed as a percentage, is also listed."
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "pressed size (in bytes) is printed instead of the compression ratio."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-h",
            "long": null,
            "arg": null,
            "description": "is printed."
        },
        {
            "flag": "-M",
            "long": null,
            "arg": null,
            "description": "end of a screenful of output, zipinfo pauses with a ``--More--'' prompt; the next screenful may be viewed by pressing the Enter (Return) key or the space bar. zipinfo can be terminated by pressing the ``q'' key and, on some systems, the Enter/Return key. Unlike Unix more(1), there is no forward-searching or editing capability. Also, zipinfo doesn't notice if long lines wrap at the edge of the screen, effectively re‐ sulting in the printing of two or more lines and the likelihood that some text will scroll off the top of the screen before being viewed. On some systems the number of available lines on the screen is not detected, in which case zipinfo assumes the height is 24 lines."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "compressed and compressed total sizes , and their overall compression factor is printed; or, if only the totals line is being printed, the values for the entire ar‐ chive are given. The compressed total size does not include the 12 additional header bytes of each encrypted entry. Note that the total compressed (data) size will never match the actual zipfile size, since the latter includes all of the internal zipfile headers in addition to the compressed data."
        },
        {
            "flag": "-T",
            "long": null,
            "arg": null,
            "description": "fault date format is a more standard, human-readable version with abbreviated month names (see examples below)."
        },
        {
            "flag": "-U",
            "long": null,
            "arg": null,
            "description": "available, the option -U forces unzip to escape all non-ASCII characters from UTF-8 coded filenames as ``#Uxxxx''. This option is mainly provided for debugging purpose when the fairly new UTF-8 support is suspected to mangle up extracted filenames. The option -UU allows to entirely disable the recognition of UTF-8 encoded filenames. The handling of filename codings within unzip falls back to the behaviour of previous versions."
        },
        {
            "flag": "-z",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [
        "To  get  a basic, short-format listing of the complete contents of a ZIP archive storage.zip,",
        "with both header and totals lines, use only the archive name as an argument to zipinfo:",
        "zipinfo storage",
        "To produce a basic, long-format listing (not verbose), including header and totals lines, use",
        "zipinfo -l storage",
        "To  list  the complete contents of the archive without header and totals lines, either negate",
        "the -h and -t options or else specify the contents explicitly:",
        "zipinfo --h-t storage",
        "zipinfo storage \\*",
        "(where the backslash is required only if the shell would otherwise expand the  `*'  wildcard,",
        "as in Unix when globbing is turned on--double quotes around the asterisk would have worked as",
        "well).  To turn off the totals line by default, use the environment variable (C shell is  as‐",
        "sumed here):",
        "setenv ZIPINFO --t",
        "zipinfo storage",
        "To  get the full, short-format listing of the first example again, given that the environment",
        "variable is set as in the previous example, it is necessary to specify the -s option  explic‐",
        "itly, since the -t option by itself implies that ONLY the footer line is to be printed:",
        "setenv ZIPINFO --t",
        "zipinfo -t storage            [only totals line]",
        "zipinfo -st storage           [full listing]",
        "The  -s  option,  like  -m  and -l, includes headers and footers by default, unless otherwise",
        "specified.  Since the environment variable specified no footers and that has a higher  prece‐",
        "dence  than  the  default  behavior of -s, an explicit -t option was necessary to produce the",
        "full listing.  Nothing was indicated about the header, however, so the -s option  was  suffi‐",
        "cient.   Note  that  both  the -h and -t options, when used by themselves or with each other,",
        "override any default listing of member files; only the  header  and/or  footer  are  printed.",
        "This  behavior is useful when zipinfo is used with a wildcard zipfile specification; the con‐",
        "tents of all zipfiles are then summarized with a single command.",
        "To list information on a single file within the archive, in medium format, specify the  file‐",
        "name explicitly:",
        "zipinfo -m storage unshrink.c",
        "The  specification  of  any member file, as in this example, will override the default header",
        "and totals lines; only the single line of  information  about  the  requested  file  will  be",
        "printed.   This is intuitively what one would expect when requesting information about a sin‐",
        "gle file.  For multiple files, it is often useful to know the  total  compressed  and  uncom‐",
        "pressed size; in such cases -t may be specified explicitly:",
        "zipinfo -mt storage \"*.[ch]\" Mak\\*",
        "To get maximal information about the ZIP archive, use the verbose option.  It is usually wise",
        "to pipe the output into a filter such as Unix more(1) if the operating system allows it:",
        "zipinfo -v storage | more",
        "Finally, to see the most recently modified files in the archive, use the -T  option  in  con‐",
        "junction  with  an external sorting utility such as Unix sort(1) (and sed(1) as well, in this",
        "example):",
        "zipinfo -T storage | sort -nr -k 7 | sed 15q",
        "The -nr option to sort(1) tells it to sort numerically in reverse order rather than  in  tex‐",
        "tual  order, and the -k 7 option tells it to sort on the seventh field.  This assumes the de‐",
        "fault short-listing format; if -m or -l is used, the proper sort(1)  option  would  be  -k 8.",
        "Older versions of sort(1) do not support the -k option, but you can use the traditional + op‐",
        "tion instead, e.g., +6 instead of -k 7.  The sed(1) command filters out all but the first  15",
        "lines  of  the  listing.   Future  releases of zipinfo may incorporate date/time and filename",
        "sorting as built-in options."
    ],
    "see_also": [
        {
            "name": "ls",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ls/1/json"
        },
        {
            "name": "funzip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/funzip/1/json"
        },
        {
            "name": "unzip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/unzip/1/json"
        },
        {
            "name": "unzipsfx",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/unzipsfx/1/json"
        },
        {
            "name": "zip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/zip/1/json"
        },
        {
            "name": "zipcloak",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/zipcloak/1/json"
        },
        {
            "name": "zipnote",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/zipnote/1/json"
        },
        {
            "name": "zipsplit",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/zipsplit/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "List detailed information about the contents of a Zip file.",
        "examples": [
            {
                "description": "List all files in a Zip file in long format (permissions, ownership, size, and modification date)",
                "command": "zipinfo {{path/to/archive.zip}}"
            },
            {
                "description": "List all files in a Zip file",
                "command": "zipinfo -1 {{path/to/archive.zip}}"
            }
        ]
    }
}