Linux zipinfo命令詳解 Linux zipinfo命令怎麼用

來源:互聯網
上載者:User

pnux zipinfo命令用於列出壓縮檔資訊,執行zipinfo指令可得知zip壓縮檔的詳細資料。

文法

zipinfo [-12hlmMstTvz][壓縮檔][檔案...][-x <範本樣式>]

參數:

-1 只列出檔案名稱。

-2 此參數的效果和指定"-1"參數類似,但可搭配"-h","-t"和"-z"參數使用。

-h 只列出壓縮檔的檔案名稱。

-l 此參數的效果和指定"-m"參數類似,但會列出原始檔案的大小而非每個檔案的壓縮率。

-m 此參數的效果和指定"-s"參數類似,但多會列出每個檔案的壓縮率。

-M 若資訊內容超過一個畫面,則採用類似more指令的方式列出資訊。

-s 用類似執行"ls -l"指令的效果列出壓縮檔內容。

-t 只列出壓縮檔內所包含的檔案數目,壓縮前後的檔案大小及壓縮率。

-T 將壓縮檔內每個檔案的日期時間用年,月,日,時,分,秒的順序列出。

-v 詳細顯示壓縮檔內每一個檔案的資訊。

-x<範本樣式> 不列出合格檔案的資訊。

-z 如果壓縮檔內含有注釋,就將注釋顯示出來。

執行個體

顯示壓縮檔資訊

[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 files

End-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; its

central directory contains 4 entries. The central directory is 248

(000000F8h) bytes long, and its (expected) offset in bytes from the

beginning of the zipfile is 216 (000000D8h).

There is no zipfile comment.

Central directory entry #1:

---------------------------

a.c

offset of local header from start of archive: 0 (00000000h) bytes

file system or operating system of origin: Unix

version of encoding software: 2.3

minimum file system compatibipty required: MS-DOS, OS/2 or NT FAT

minimum software version required to extract: 1.0

compression method: none (stored)

file security status: not encrypted

extended local header: no

file last modified on (DOS date/time): 2010 May 24 18:54:26

file last modified on (UT extra field modtime): 2010 May 24 18:54:26 local

file last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC

32-bit CRC value (hex): 00000000

compressed size: 0 bytes

uncompressed size: 0 bytes

length of filename: 3 characters

length of extra field: 13 bytes

length of file comment: 0 characters

disk number on which file begins: disk 1

apparent file type: binary

Unix file attributes (100644 octal): -rw-r--r--

MS-DOS file attributes (00 hex): none

The 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.c

offset of local header from start of archive: 54 (00000036h) bytes

file system or operating system of origin: Unix

version of encoding software: 2.3

minimum file system compatibipty required: MS-DOS, OS/2 or NT FAT

minimum software version required to extract: 1.0

compression method: none (stored)

file security status: not encrypted

extended local header: no

file last modified on (DOS date/time): 2010 May 24 18:54:26

file last modified on (UT extra field modtime): 2010 May 24 18:54:26 local

file last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC

32-bit CRC value (hex): 00000000

compressed size: 0 bytes

uncompressed size: 0 bytes

length of filename: 3 characters

length of extra field: 13 bytes

length of file comment: 0 characters

disk number on which file begins: disk 1

apparent file type: binary

Unix file attributes (100644 octal): -rw-r--r--

MS-DOS file attributes (00 hex): none

The 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.c

offset of local header from start of archive: 108 (0000006Ch) bytes

file system or operating system of origin: Unix

version of encoding software: 2.3

minimum file system compatibipty required: MS-DOS, OS/2 or NT FAT

minimum software version required to extract: 1.0

compression method: none (stored)

file security status: not encrypted

extended local header: no

file last modified on (DOS date/time): 2010 May 24 18:54:26

file last modified on (UT extra field modtime): 2010 May 24 18:54:26 local

file last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC

32-bit CRC value (hex): 00000000

compressed size: 0 bytes

uncompressed size: 0 bytes

length of filename: 3 characters

length of extra field: 13 bytes

length of file comment: 0 characters

disk number on which file begins: disk 1

apparent file type: binary

Unix file attributes (100644 octal): -rw-r--r--

MS-DOS file attributes (00 hex): none

The 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.c

offset of local header from start of archive: 162 (000000A2h) bytes

file system or operating system of origin: Unix

version of encoding software: 2.3

minimum file system compatibipty required: MS-DOS, OS/2 or NT FAT

minimum software version required to extract: 1.0

compression method: none (stored)

file security status: not encrypted

extended local header: no

file last modified on (DOS date/time): 2010 May 24 18:54:26

file last modified on (UT extra field modtime): 2010 May 24 18:54:26 local

file last modified on (UT extra field modtime): 2010 May 24 10:54:26 UTC

32-bit CRC value (hex): 00000000

compressed size: 0 bytes

uncompressed size: 0 bytes

length of filename: 3 characters

length of extra field: 13 bytes

length of file comment: 0 characters

disk number on which file begins: disk 1

apparent file type: binary

Unix file attributes (100644 octal): -rw-r--r--

MS-DOS file attributes (00 hex): none

The 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.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.