博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Nginx日志切割
阅读量:2338 次
发布时间:2019-05-10

本文共 268 字,大约阅读时间需要 1 分钟。

vim cut_nginx_log.sh

#!/bin/bashcd /application/nginx/logs &&/bin/mv access_wechat.log access_wechat_$(date +%F -d -1day).log/application/nginx/sbin/nginx -s reopen

日志删除

cat nginxlog_del.sh

#!/bin/shfind  /application/nginx/logs  -mtime +6  -name "*[0-9]*"|xargs rm -f

 

转载地址:http://ohepb.baihongyu.com/

你可能感兴趣的文章
Word Ladder
查看>>
Word Ladder II
查看>>
Longest Consecutive Sequence
查看>>
Surrounded Regions
查看>>
Palindrome Partitioning
查看>>
Palindrome Partitioning II
查看>>
Clone Graph
查看>>
Gas Station
查看>>
Candy
查看>>
Single Number
查看>>
SetForeGroundWindow
查看>>
判断程序执行用户和活动用户是否一致
查看>>
Com引起计数
查看>>
IHTMLDocument2 IE浏览器编程
查看>>
C/C++中指针和引用之相关问题研究
查看>>
一些AIX问题,自动logout
查看>>
AIX操作系统及HACMP群集系统安装步骤
查看>>
AIX资源监控与调制工具
查看>>
aix里面怎么查看实际的磁盘空间
查看>>
银行AIX日常维护内容
查看>>