代码改变世界

nginx 截断日志一个批处理

2011-02-22 15:34  无常  阅读(765)  评论(1编辑  收藏
net stop nginx
taskkill /F /IM nginx.exe
set "cmdstr=rename logs logs%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%-%time:~3,2%.log"

call %cmdstr%
set "cmdstr=md logs "

call %cmdstr% 

net start nginx
#pause
Locations of visitors to this page