nginx 筛选指定时间段日志

nginx 日志格式:
 
10.11.240.68 - - [10/Apr/2020:10:59:06 +0800] "POST /admin/hotkeywords HTTP/1.0" 200 2506 "https://tgbus-ums-xy.tgbus.com/app/search-word" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gec
ko/20100101 Firefox/55.0"
10.11.240.68 - - [10/Apr/2020:10:59:53 +0800] "POST /admin/hotkeywords/detail HTTP/1.0" 200 269 "https://tgbus-ums-xy.tgbus.com/app/search-word" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.
0) Gecko/20100101 Firefox/55.0"
10.11.240.68 - - [10/Apr/2020:11:00:19 +0800] "POST /admin/channeltype HTTP/1.0" 200 1550 "https://tgbus-ums-xy.tgbus.com/app/channel/type" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Ge
cko/20100101 Firefox/55.0"


用法: 
sed -n '/10\/Apr\/2020:10:58:19/','/10\/Apr\/2020:11:00:38/p' /data/logs/tgbus_ums_api/access.log 

  

posted @ 2020-04-10 11:33  lixinliang  阅读(2851)  评论(0编辑  收藏  举报