养生网站建设免费搜索引擎优化结果
zipinfo命令用来列出压缩文件信息。执行zipinfo指令可得知zip压缩文件的详细信息。
语法
zipinfo(选项)(参数)
选项
-1:只列出文件名称;
-2:此参数的效果和指定“-1”参数类似,但可搭配“-h”,“-t”和“-z”参数使用;
-h:只列出压缩文件的文件名称;
-l:此参数的效果和指定“-m”参数类似,但会列出原始文件的大小而非每个文件的压缩率;
-m:此参数的效果和指定“-s”参数类似,但多会列出每个文件的压缩率;
-M:若信息内容超过一个画面,则采用类似more指令的方式列出信息;
-s:用类似执行“ls-l”指令的效果列出压缩文件内容;
-t:只列出压缩文件内所包含的文件数目,压缩前后的文件大小及压缩率;
-T:将压缩文件内每个文件的日期时间用年,月,日,时,分,秒的顺序列出;
-v:详细显示压缩文件内每一个文件的信息;
-x<范本样式>:不列出符合条件的文件的信息;
-z:如果压缩文件内含有注释,就将注释显示出来。
参数
文件:指定zip格式的压缩包。
实例
显示压缩文件信息
[root@w3cschool.cc a]# zipinfo cp.zip
Archive: cp.zip 486 bytes 4 files
-rw-r--r-- 2.3 unx 0 bx stor 24-May-10 18:54 a.c
-rw-r--r-- 2.3 unx 0 bx stor 24-May-10 18:54 b.c
-rw-r--r-- 2.3 unx 0 bx stor 24-May-10 18:54 c.c
-rw-r--r-- 2.3 unx 0 bx stor 24-May-10 18:54 e.c
4 files, 0 bytes uncompressed, 0 bytes compressed: 0.0%
[root@w3cschool.cc a]#
显示压缩文件中每个文件的信息
[root@w3cschool.cc a]# zipinfo -v cp.zip
Archive: cp.zip 486 bytes 4 filesEnd-of-central-directory record:
-------------------------------Actual offset of end-of-central-dir record: 464 (000001D0h)Expected offset of end-of-central-dir record: 464 (000001D0h)(based on the length of the central directory and its expected offset)This zipfile constitutes the sole disk of a single-part archive; itscentral directory contains 4 entries. The central directory is 248(000000F8h) bytes long, and its (expected) offset in bytes from thebeginning of the zipfile is 216 (000000D8h).There is no zipfile comment.Central directory entry #1:
---------------------------a.coffset of local header from start of archive: 0 (00000000h) bytesfile system or operating system of origin: Unixversion of encoding software: 2.3minimum file system compatibility required: MS-DOS, OS/2 or NT FATminimum software version required to extract: 1.0compression method: none (stored)file security status: not encryptedextended local header: nofile last modified on (DOS date/time): 2010 May 24 18:54:26file last modified on (UT extra field modtime): 2010 May 24 18:54:26 localfile last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC32-bit CRC value (hex): 00000000compressed size: 0 bytesuncompressed size: 0 byteslength of filename: 3 characterslength of extra field: 13 byteslength of file comment: 0 charactersdisk number on which file begins: disk 1apparent file type: binaryUnix file attributes (100644 octal): -rw-r--r--MS-DOS file attributes (00 hex): noneThe central-directory extra field contains:- A subfield with ID 0x5455 (universal time) and 5 data bytes.The local extra field has UTC/GMT modification/access times.- A subfield with ID 0x7855 (Unix UID/GID) and 0 data bytes.There is no file comment.Central directory entry #2:
---------------------------b.coffset of local header from start of archive: 54 (00000036h) bytesfile system or operating system of origin: Unixversion of encoding software: 2.3minimum file system compatibility required: MS-DOS, OS/2 or NT FATminimum software version required to extract: 1.0compression method: none (stored)file security status: not encryptedextended local header: nofile last modified on (DOS date/time): 2010 May 24 18:54:26file last modified on (UT extra field modtime): 2010 May 24 18:54:26 localfile last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC32-bit CRC value (hex): 00000000compressed size: 0 bytesuncompressed size: 0 byteslength of filename: 3 characterslength of extra field: 13 byteslength of file comment: 0 charactersdisk number on which file begins: disk 1apparent file type: binaryUnix file attributes (100644 octal): -rw-r--r--MS-DOS file attributes (00 hex): noneThe central-directory extra field contains:- A subfield with ID 0x5455 (universal time) and 5 data bytes.The local extra field has UTC/GMT modification/access times.- A subfield with ID 0x7855 (Unix UID/GID) and 0 data bytes.There is no file comment.Central directory entry #3:
---------------------------c.coffset of local header from start of archive: 108 (0000006Ch) bytesfile system or operating system of origin: Unixversion of encoding software: 2.3minimum file system compatibility required: MS-DOS, OS/2 or NT FATminimum software version required to extract: 1.0compression method: none (stored)file security status: not encryptedextended local header: nofile last modified on (DOS date/time): 2010 May 24 18:54:26file last modified on (UT extra field modtime): 2010 May 24 18:54:26 localfile last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC32-bit CRC value (hex): 00000000compressed size: 0 bytesuncompressed size: 0 byteslength of filename: 3 characterslength of extra field: 13 byteslength of file comment: 0 charactersdisk number on which file begins: disk 1apparent file type: binaryUnix file attributes (100644 octal): -rw-r--r--MS-DOS file attributes (00 hex): noneThe central-directory extra field contains:- A subfield with ID 0x5455 (universal time) and 5 data bytes.The local extra field has UTC/GMT modification/access times.- A subfield with ID 0x7855 (Unix UID/GID) and 0 data bytes.There is no file comment.Central directory entry #4:
---------------------------e.coffset of local header from start of archive: 162 (000000A2h) bytesfile system or operating system of origin: Unixversion of encoding software: 2.3minimum file system compatibility required: MS-DOS, OS/2 or NT FATminimum software version required to extract: 1.0compression method: none (stored)file security status: not encryptedextended local header: nofile last modified on (DOS date/time): 2010 May 24 18:54:26file last modified on (UT extra field modtime): 2010 May 24 18:54:26 localfile last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC32-bit CRC value (hex): 00000000compressed size: 0 bytesuncompressed size: 0 byteslength of filename: 3 characterslength of extra field: 13 byteslength of file comment: 0 charactersdisk number on which file begins: disk 1apparent file type: binaryUnix file attributes (100644 octal): -rw-r--r--MS-DOS file attributes (00 hex): noneThe central-directory extra field contains:- A subfield with ID 0x5455 (universal time) and 5 data bytes.The local extra field has UTC/GMT modification/access times.- A subfield with ID 0x7855 (Unix UID/GID) and 0 data bytes.There is no file comment.