Linux 大文件日志快速定位错误或者异常的位置


1.得到错误日志或者异常日志的行号

cat -n test.log |grep "error" 

cat -n test.log |grep "exception"

 

 

 

2. 通过位置往前往后查看日志详细

//339563 can not close IO 查询语句在 339500 -339600行中 ||100代表在339500 往后看100行

 cat -n test.log |tail -n +339500 |head -n 100  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM