1查看实时日志
tail -f /data/logs/ats-jc/info.log
2查看实时日志,只查看300行
tail -f /data/logs/ats-jc/info.log -n 300
3查看日记300行,但过滤为error的
tail -f /data/logs/ats-jc/info.log -n 300 | grep error
4查看日记300行,但过滤为error的20行
tail -f /data/logs/ats-jc/info.log -n 300 | grep INFO -A20
5查看日志中出现Exception的后20行
grep Exception /data/logs/ats-jc/info.log -A20
公司常用查看日志命令
实时日志监控与过滤技巧:异常追踪与关键信息提取
最新推荐文章于 2025-04-17 11:01:43 发布
3506

被折叠的 条评论
为什么被折叠?



