Linux zipinfo command
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
file.zip: The .zip file whose information is to be viewed.zipfiles.
options parameters:
-1: List only.zipthe file names in the file, one file per line.-t: Show the total number of files and the total uncompressed size.-h: Display file sizes in a more readable (human-friendly) format (such as KB, MB).-m: Display.zipPermission information (in Unix format) for each file in the file.-v: Display more detailed information, including compression method, version, compression ratio, etc.-s: Summarize.zipthe overall information of the file, such as the number of files, total size, etc.-l: List in detail.zipthe contents of the file, including file size, date, time, etc.
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
zipinfois a read-only tool and does not make any.zipchanges to the file.zipinfoprovides more detailed information thanunzip -l, making it suitable when you need to gain an in-depth understanding of.zipthe file.
Linux Command Reference