怎样用zip压缩多个文件呢?
语法:
zip {.zip file-name} {file-names}
# zip var-log-files.zip /var/log/* a
dding: var/log/acpid (deflated 81%) a
dding: var/log/anaconda.log (deflated 79%) a
dding: var/log/anaconda.syslog (deflated 73%) a
dding: var/log/anaconda.xlog (deflated 82%) a
dding: var/log/audit/ (stored 0%) a
dding: var/log/boot.log (stored 0%) a
dding: var/log/boot.log.1 (deflated 40%)
adding: var/log/boot.log.2 (deflated 42%)
adding: var/log/boot.log.3 (deflated 40%)
adding: var/log/boot.log.4 (deflated 40%)
如何递归地压缩一个目录及目录下的文件?
# zip -r var-log-dir.zip /var/log/
如何在不解压一个压缩包的情况下看里面的文件呢?
# unzip -l var-log.zip
阅读(797) | 评论(0) | 转发(0) |