标签:bin nginx日志切割 col class root 定时 access open div
nginx日志切割
#!/bin/sh #nginx日志切割 #设置 Log_path=/www/server/nginx/logs Yesterday=$(date -d "yesterday" +%Y-%m-%d_%S) Nginxbin=/www/server/nginx/sbin/nginx #日志改名 /bin/mv $Log_path/access.log $Log_path/access.$Yesterday.log /bin/mv $Log_path/error.log $Log_path/error.$Yesterday.log #重新生成日志 $Nginxbin -s reopen # #定时任务 # #nginx日志切割 # 00 00 * * * /root/sh/cut_log.sh # #
标签:bin nginx日志切割 col class root 定时 access open div
原文地址:http://www.cnblogs.com/elvi/p/7717986.html