13.Nginx访问日志&日志切割&静态文件
# sh -x /usr/local/sbin/nginx_logrotate.sh ++ date -d '-1 day' +%Y%m%d+ d=20180314
+ logdir=/tmp/
+ nginx_pid=/usr/local/nginx/logs/nginx.pid
+ cd /tmp/
++ ls atorreid.com.log ' php_errors.log' php_errors.log test.com.log torrecid.com.log
+ for log in '`ls *.log`'
+ mv atorreid.com.log atorreid.com.log-20180314
+ for log in '`ls *.log`'
+ mv php_errors.log php_errors.log-20180314
+ for log in '`ls *.log`'
+ mv php_errors.log php_errors.log-20180314
mv: 无法获取"php_errors.log" 的文件状态(stat): 没有那个文件或目录
+ for log in '`ls *.log`'
+ mv test.com.log test.com.log-20180314
+ for log in '`ls *.log`'
页:
[1]