CentOS7之按时间段截取指定的Tomcat日志到指定文件的方法: sed -n '/2016-11-02 15:00:/,/2016-11-02 15:05:/p' catalina.out > /tmp/123/error.txt