1 sed使用 sed -n '/2017:15:25:00/,/2013:17:30:00/p' access.log >25-30.log 2 grep使用 grep "2017:15:2[5-9]" access.log >25-30.log 标红的地方是需要根据日志的时间来修改的
linux如何查看一段时间的日志sed和grep的使用
最新推荐文章于 2024-04-17 19:30:00 发布
1 sed使用 sed -n '/2017:15:25:00/,/2013:17:30:00/p' access.log >25-30.log 2 grep使用 grep "2017:15:2[5-9]" access.log >25-30.log 标红的地方是需要根据日志的时间来修改的