mkdir -p ${logs_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")/
mv ${source_path}logs.log ${logs_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")/i-access_$(date -d "yesterday" +"%Y%m%d").log
mv ${source_path}error.log ${logs_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")/i-error_$(date -d "yesterday" +"%Y%m%d").log
kill -HUP `cat /usr/local/nginx/var/nginx.pid`
nginx 访问日志和错误日志按日切割sh脚本
最新推荐文章于 2024-03-20 00:15:00 发布