log_path="/home/wwwlogs/"
mkdir -p ${log_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")/
mv ${log_path}access.log ${log_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")/access_$(date -d "yesterday" +"%Y%m%d").log
kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
________________________________
crontab -e
0 0 * * * /usr/local/nginx/sbin/cut_nginx_log.sh