网上看到了一篇文章: Using bzip2 with less 这篇文章介绍了一个脚本,脚本功能就是列出压缩包所压缩的文件,本文算是原文搬运,不过减少点东西以适用我日常系统运用. #!/bin/bash # Source: http://tldp.org/HOWTO/Bzip2-5.html # Function: List file in a archive case "$1" in *. >/dev/null ;; *.tgz) >/dev/null ;; *. &g
本文参考http://stackoverflow.com/questions/9813243/extract-files-from-zip-file-and-retain-mod-date-python-2-7-1-on-windows-7 import os import time from zipfile import ZipFile zf = ZipFile('archive.zip', 'r') for zi in zf.infolist(): zf.extract(zi) date_t
指定禁止访问 某些后缀的文件 修改apache配置httpd.conf,在最后加上配置后,重启apache <Files ~ ".txt|.log|.zip|.gz|.sql"> Order allow,deny Deny from all </Files> 复制代码 // 这样就可以防止日志.压缩包等文件被下载了