十年JAVA搬砖路——Linux上查看日志

Tail 命令查看实时日志

tail -500f log.log

Grep 定位错误日志

grep -i -A 10 -B 10 --color=auto 'aB' abc.txt
	- -I 忽略大小写
	- -A 10 匹配位置的前10行
	- -B 10 匹配位置的后10行
	- --color=auto 查找结果高亮显示。

less 普通查看日志,支持鼠标上下滚动和搜索。

 less log.log

猜你喜欢

转载自blog.csdn.net/weixin_43485737/article/details/132406702
今日推荐