手机版

Linux zipinfo命令 - Linux备份压缩命令参数及用法手册

2019-09-17 阅读 :

Linux 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.c4 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; 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 compatibility 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 compatibility 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 compatibility 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 compatibility 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.

阿里云服务器优惠网 阿里云优惠券 服务器教程 vps教程 vps是什么 网络工具 网站工具 服务器知识

本文标题:Linux zipinfo命令 - Linux备份压缩命令参数及用法手册 - 服务器教程_服务器技术_服务器知识_vps教程
本文地址:https://www.helloaliyun.com/tutorial/875.html

相关文章

  • CentOS 7 常用命令(系统关机、重启以及登出)

    关机:(系统的关机、重启以及登出 ) # 关闭系统(1)[root@localhost ~]# shutdown -h now # 关闭系统(2)[root@localhost ~]# init 0 # 关闭系统(3)[root@localhost ~]# telinit 0 # 按预定时间关闭系统[root@localhost...

    2019-12-07 服务器教程
  • linux重启命令 reboot与shutdown -r now的区别与联系

    在linux命令中reboot是重新启动,shutdown -r now是立即停止然后重新启动,都说他们两个是一样的,其实是有一定的区别的。shutdown命令可以安全地关闭或重启Linux系统,它在系统关闭之前给系统上的所有登录用户提示一条警告...

    2019-12-07 服务器教程
  • CentOS 7 如何使用命令重启或关机

    安装GNOME的朋友们首先切换到字符界面。切换到字符界面的方法如下: 先登陆进入系统,进入图形化界面,然后按Ctrl+Alt+F6(笔记本的是Ctrl+Alt+shift+Fn),进入字符界面。关机命令:shutdown或poweroffshutdown:shutdown -h now...

    2019-12-07 服务器教程
  • CentOS 7 正确关机重启的命令方法

    linux主要用于服务器领域,而在服务器上执行一项服务是永无止境的,除非遇到特殊情况,否则不会关机。和Windows不同,在linux系统下,很多进程是在后台执行的。在屏幕背后,可能有很多人同时在工作。如果直接按下电源的按钮,其他...

    2019-12-07 服务器教程
  • CentOS下的yum upgrade和yum update区别,没事别乱用!

    说明:生产环境对软件版本和内核版本要求非常精确,别没事有事随便的进行yum update操作!!!!!!!!!yum update: 升级所有包同时也升级软件和系统内核yum upgrade:只升级所有包,不升级软件和系统内核...

    2019-12-07 服务器教程
你可能感兴趣
热门浏览