Linux zipinfo Command

Linux 命令大全Linux Command Library

The Linux zipinfo command is used to display.zipdetailed information about compressed files without decompressing them.

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

Syntax

zipinfo [options] file.zip
  • file.zip: The.zipfile to view information about.

options parameter:

  • -1: Only list.zipthe file names in the file, one file per line.
  • -t: Display the total number of files and the total uncompressed size.
  • -h: Display file sizes in a more readable format (human-friendly format) (such as KB, MB).
  • -m: Display.zippermission information for each file in the file (Unix format).
  • -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.

Examples

List the contents of a .zip file

zipinfo archive.zip

This command will list all files and directories in archive.zip and display basic information about the files, such as file size, date, time, and compression ratio.

List only file names

zipinfo -1 archive.zip

This command will only list the file names in archive.zip, one file per line, without other detailed information.

Display detailed information

zipinfo -v archive.zip

This command will display detailed information for 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 will display file sizes in a more readable format (such as KB, MB), making file sizes easier to understand.

Summarize the overall information of a .zip file

zipinfo -s archive.zip

This command will provide summary information for the archive.zip file, such as the total number of files, total compressed and decompressed sizes, etc.

Notes

  • zipinfois a read-only tool and will not.zipmake any modifications to the file.
  • zipinfoThe information it provides is moreunzip -ldetailed and is suitable for when you need to deeply understand.zipthe file.

Linux 命令大全Linux Command Library

Other Extensions