Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux zipinfo command

Linux zipinfo command

Linux Command Reference Linux Command Reference

The Linux zipinfo command is used to display detailed information about a .zip compressed file without extracting it.

zipinfo provides detailed information about the contents, compression ratio, timestamps, and more of a compressed file; it is a common tool for inspecting the contents of .zip files.

Syntax

zipinfo [options] file.zip

options parameters:

Example

List the contents of a .zip file



zipinfo archive.zip

This command lists all files and directories in archive.zip and displays basic file information such as file size, date, time, and compression ratio.

** List only file names**



zipinfo -1 archive.zip

This command lists only the file names in archive.zip, one per line, with no other detailed information.

** Display detailed information**



zipinfo -v archive.zip

This command displays detailed information about each file in archive.zip, including file permissions, compression method, compression ratio, version, etc.

** Display human-readable file size information**



zipinfo -h archive.zip

This command displays file sizes in a more readable format (such as KB, MB), making them easier to understand.

** Summarize the overall information of a .zip file**



zipinfo -s archive.zip

This command provides overall information about the archive.zip file, such as the total number of files and the total compressed and uncompressed sizes.

Notes

Linux Command Reference Linux Command Reference