1.得到错误日志或者异常日志的行号
cat -n test.log |grep "error"
cat -n test.log |grep "exception"
2. 通过位置往前往后查看日志详细
cat -n test.log |tail -n +92|head -n 20
Linux 大文件日志快速定位错误或者异常的位置
原文:https://www.cnblogs.com/woshixiangshang/p/11585306.html