nginx日志分割 脚本如下
#!/bin/bashlogs_path="/usr/local/nginx/logs/"mv ${logs_path}access.log ${logs_path}access_$(date -d "yesterday" +%Y%m%d).logkill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
00 00 * * * /bin/bash /root/nginxlogs.sh