zipinfo
List information about ZIP archive files
TLDR
List all files in a Zip file in long format (permissions, ownership, size, and modification date)
List all files in a Zip file
SYNOPSIS
zipinfo [options] zipfile [file(s) ...] [<exlist>]
zipinfo {-v|-V|-Z} [zipfile]
PARAMETERS
-b
Show binary compatibility information for specific systems (e.g., VMS).
-c
Output entries in a comma-separated format.
-d
Display the disk number and byte offset of the local header for each entry.
-D
Display timestamps in the DOS date/time format.
-e
Display extra fields for each entry, if present.
-E
Display extra fields for central directory entries only.
-F
Output fixed information (header fields) only, ignoring the file list.
-h
Display only the archive header (central directory and end of central directory records).
-i
Ignore case when matching filenames within the archive.
-j
Junk paths; don't print directory names, only the base filename.
-L
Convert filenames to lowercase for output.
-m
Display information in medium format, a common compromise between short and verbose.
-M
Pipe output through a pager (e.g., 'more' or 'less').
-n
Display numeric User IDs (UID) and Group IDs (GID) instead of names.
-o
Display original offsets of each entry's local header within the zipfile.
-q
Quiet mode; suppress most informational messages and prompts.
-R
Recurse into subdirectories (only effective when specifying files to list).
-s
Display information in short format, showing less detail per entry.
-S
Display system-specific information, such as VMS file attributes.
-t
Display total (archive) and trailing (end of central directory) comments.
-T
Display full Unix timestamps (mtime, atime, ctime) if available.
-v
Display information in verbose format, showing maximum detail.
-V
Display version information for zipinfo.
-z
Display only the zipfile comment.
-Z
Display zipinfo version information (same as -V).
DESCRIPTION
The zipinfo command provides comprehensive details about the contents of a zip archive without the need to extract its files. It functions as a powerful inspection tool, displaying metadata for each archived member, such as file permissions, compression method, original and compressed sizes, modification dates, CRC-32 checksums, and extra fields. Unlike unzip, its primary purpose is not extraction but rather a technical listing and verification of an archive's structure and integrity.
It is particularly useful for quickly assessing an archive's contents, checking for specific files, or debugging issues before committing to a full extraction. zipinfo supports various output formats, from concise summaries to highly verbose listings, and can filter information based on specific files or patterns.
CAVEATS
zipinfo primarily displays metadata; it does not extract or modify archive contents. While it can report issues like CRC errors, it cannot repair corrupted archives. It relies on the metadata stored in the zip file, which might not always perfectly translate to the current operating system's conventions (e.g., file permissions or timestamps). For password-protected archives, it can typically still list filenames and basic metadata, but cannot display information that would require decryption.
DEFAULT OUTPUT FORMATS
The default output format of zipinfo depends on whether specific filenames are provided as arguments. When invoked without filenames (e.g., zipinfo archive.zip
), it defaults to a verbose (-v
) listing, showing extensive details for all members. If specific filenames are given (e.g., zipinfo archive.zip file1.txt
), it defaults to a shorter (-s
) format, providing a concise one-line summary per entry. The -m
(medium) option often offers a good balance of detail.
FILE SELECTION AND EXCLUSION
Users can specify one or more file(s) after the zipfile argument to list information only for those matching entries. Additionally, an exlist (exclusion list) can be provided, prefixed with an @
symbol (e.g., zipinfo archive.zip @exclude_list.txt
), to exclude files listed in the specified text file from the output.
HISTORY
zipinfo is an integral part of the widely used Info-ZIP project, which began in the early 1990s. The project's goal was to create a set of portable, freely available utilities for manipulating PKZIP-compatible archives across various operating systems. zipinfo was developed alongside zip and unzip to provide a non-extractive way to inspect zip file contents, making it invaluable for quick checks, verification, and understanding archive structures without consuming disk space or decompressing data. Its design emphasizes cross-platform compatibility and adherence to the .ZIP file format specification, ensuring its continued relevance in archive management.