#Query log information with keywords in the log file 2016-04-13 11:26:00
grep -C 10 '2016-04-13 11:26:00' |more
explain:
grep: query, filter
-C: grep's -A, -B, and -C options can display the following, front, and front rows of matching rows:
10: How many lines are there before and after
'2016-04-13 11:26:00': Keywords, note that they are single quotes wrapped
: The retrieved file can be a directory ./
|more: This is viewed in the form of a pagination. There are too many screens to be read. You need to slowly calm down and read them bit by bit to see the problem. Just like this article, you must calm down and gently click on a like before leaving.
The above LINUX search tomcat log keyword command is all the content I share with you. I hope you can give you a reference and I hope you can support me more.