Ten years of JAVA moving bricks - view logs on Linux

Tail command to view real-time logs

tail -500f log.log

Grep locate error log

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

less Commonly view logs, support scrolling and searching with the mouse.

 less log.log

Guess you like

Origin blog.csdn.net/weixin_43485737/article/details/132406702