Linux command
zipinfo 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Show archive info
zipinfo [archive.zip]
Short listing
zipinfo -1 [archive.zip]
Long listing
zipinfo -l [archive.zip]
Medium listing
zipinfo -m [archive.zip]
Show header info
zipinfo -h [archive.zip]
Show totals only
zipinfo -t [archive.zip]
Show specific file info
zipinfo [archive.zip] [file.txt]
说明
zipinfo displays information about ZIP archives without extracting. It shows structure, compression, and metadata. Short listing (-1) provides filenames only, useful for scripting. Each file appears on its own line. Long listing (-l) resembles ls -l output. It shows permissions, sizes, compression, and dates. The header (-h) shows archive-level information: filename, size, and number of entries. Totals (-t) summarize the archive: file count, total sizes, and compression ratio. Pattern matching selects specific files to display. Wildcards work for filtering large archives.
参数
- -1
- Filenames only, one per line.
- -2
- Filenames only, allows headers (-h), totals (-t), and comments (-z).
- -s
- Short Unix ls -l format (default).
- -m
- Medium format: adds compression factor percentage.
- -l
- Long format: shows compressed size in bytes.
- -h
- Print archive header (name, size, file count).
- -t
- Print totals (file count, total sizes, compression ratio).
- -T
- Print timestamps in sortable decimal format (yymmdd.hhmmss).
- -z
- Print archive comment.
- -v
- Verbose multi-page format with all available info.
- -M
- Pipe output through internal pager (like more).
- -x _PATTERN_
- Exclude files matching pattern.
FAQ
What is the zipinfo command used for?
zipinfo displays information about ZIP archives without extracting. It shows structure, compression, and metadata. Short listing (-1) provides filenames only, useful for scripting. Each file appears on its own line. Long listing (-l) resembles ls -l output. It shows permissions, sizes, compression, and dates. The header (-h) shows archive-level information: filename, size, and number of entries. Totals (-t) summarize the archive: file count, total sizes, and compression ratio. Pattern matching selects specific files to display. Wildcards work for filtering large archives.
How do I run a basic zipinfo example?
Run `zipinfo [archive.zip]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -1 do in zipinfo?
Filenames only, one per line.