Sunday, March 8, 2009

047 校验zip归档文件

有时候你只是想校验一下规定文件的有效性而并不像真正的解压缩它,你可以在zip命令后加一个-t选项:
# unzip -t var-log.zip 

Archive: var-log.zip
testing: var/log/acpid OK
testing: var/log/anaconda.log OK
testing: var/log/anaconda.syslog OK

skip...

testing: var/log/wtmp OK
testing: var/log/wtmp.1 OK
testing: var/log/Xorg.0.log OK

No errors detected in compressed data of var-log.zip.

No comments:

Post a Comment