代码改变世界

nginx 截断日志一个批处理

2011-02-22 15:34  无常  阅读(932)  评论(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