Tuesday, June 11, 2013

Validate a zip files/archive

Sometime you may want to validate a zip archive without extracting it. To test the validity of the zip file, pass option –t as shown below.

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