Windows下Nginx日志分割
来源:互联网 发布:淘宝企业店铺怎么注销 编辑:程序博客网 时间:2024/05/15 09:39
@echo off
rem check nginx task list in system
rem tasklist /fi “imagename eq nginx.exe”
rem taskkill /F /IM nginx.exe
rem get time in format
set dst=%date:~6,4%%date:~0,2%%date:~3,2%
rem rename and backup km download log
set “cmdstr=move D:\nginx-1.8.0\logs\svckb_access.log D:\nginx-1.8.0\logs\%dst%svckb_access.log
call %cmdstr%”
rem rename and backup km access log
set “cmdstr=move D:\nginx-1.8.0\logs\svckb_access.log D:\nginx-1.8.0\logs\%dst%svckm_access.log
call %cmdstr%”
rem rename and backup wcf service access log
set “cmdstr=move D:\nginx-1.8.0\logs\st_access.log D:\nginx-1.8.0\logs\%dst%st_access.log
call %cmdstr%”
rem rename and backup error log
set “cmdstr=move D:\nginx-1.8.0\logs\error.log D:\nginx-1.8.0\logs\%dst%error.log
call %cmdstr%”
rem delete log in 7 days before
forfiles /p “D:\nginx-1.8.0\logs” /s /m *.log /d -7 /c “cmd /c del @path”
rem re-opening log files
nginx -s reopen
echo on
Notice:
date format may be different in each system
- windows下nginx日志分割
- Windows下Nginx日志分割
- Windows下nginx定时分割日志
- Windows下nginx定时分割日志
- linux下 Nginx日志分割
- linux 下 nginx 日志分割
- nginx/Windows-1.9.0的日志分割
- windows下关闭nginx日志
- nginx日志分割
- nginx 分割日志文件
- nginx日志分割(linux)
- nginx,php日志分割
- nginx 日志分割脚本
- nginx 定时分割日志
- nginx 日志分割脚本
- nginx 日志分割脚本
- Nginx日志分割配置
- Nginx日志分割
- 《编程之法》1.1字符串的旋转
- [暑假集训] jzoj 2016.7.14 noip模拟赛B 总结
- CocoaPods安装使用
- 自动订餐系统
- 理解卷积
- Windows下Nginx日志分割
- 调试JS的技巧
- Binary Tree Level Order Traversal
- Letter Combinations of a Phone Number
- 集合的常用知识
- Android Studio 对GitHub开源项目的引用及导入
- i++与++i
- linux命令ps aux|grep xxx详解
- 借助 windows cmd 批量创建文件夹