是否有命令列出.zip文件中文件的压缩文件大小?


11

我想查看已压缩为单个zip文件的每个文件的绝对大小(以字节为单位)。阅读了zip手册页后,我不确定该实用程序可以做到这一点。这是在Mac OS X上。

就像是:

$zip list myarchive.zip

file1.jpg 100 bytes compressed 3000 bytes uncompressed
file2.jpg 130 bytes compressed 3440 bytes uncompressed

Answers:


16

您可以将unzip实用程序与-v标志一起使用:

unzip -v files.zip

Archive:  files.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 11-23-2011 15:02 00000000  file1
       0  Stored        0   0% 11-23-2011 15:02 00000000  file2
--------          -------  ---                            -------
       0                0   0%                            2 files

注意:这里的文件大小是0因为我制作了长度为零的测试文件。



By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.