
该脚本会自动切割/home/wwwlogs/目录下所有的log文件
#!/bin/bash
#自动版日志切割 无需设置
#function:cut nginx log files for lnmp v0.5 and v0.6
#author: http://lnmp.org
#set the path to nginx log files
log_files_path="/home/wwwlogs/"
log_files_dir=${log_files_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")
#set the path to nginx.
nginx_sbin="/usr/loca...