nginx日志切割

 

 #!/bin/sh

 cd /application/nginx/logs

 mv www_access.log www_access$(date +%F -d -1day).log

 /application/nginx/sbin/nginx -s reload

 

 ##

 crontab -e

 #####cut nginx access log by lvnian at 201509

 00 00 * * * /bin/sh /server/scripts/nginxlog.sh >>/dev/null 2>&1

 ################nginx log