Linux large log files quickly locate errors or anomalies

1. exception log or logs error obtained line number

cat -n test.log |grep "error" 

cat -n test.log |grep "exception"

 

 

 

2. forward position back to view the log details

 cat -n test.log |tail -n +92|head -n 20

Guess you like

Origin www.cnblogs.com/woshixiangshang/p/11585306.html