Linux search Tomcat log keyword command

Time:2020-11-20

#Inquiry catalina.out The key words in the log file are the log information of 11:26:00 on April 13, 2016

grep -C 10 ‘2016-04-13 11:26:00’ catalina.out |more

Explanation:

Grep: query, filter

-C: The – A, – B, – C options of grep can display the following, front, and front lines of the matching line

10: How many lines are there before and after

‘2016-04-13 11:26:00’: key words, please note that they are wrapped in single quotation marks

catalina.out : the retrieved file can be a directory/

|More: This is viewed in the form of pagination. The whole screen is too much to read. You need to calm down slowly to see the problem bit by bit. Just like this article, you must calm down and gently praise before you go.

The above Linux search Tomcat log keyword command is the small editor to share all the content, I hope to give you a reference, also hope that you can support developeppaer.

Recommended Today

Stack chain storage

Linked list implementation stack Create three files: stacklinked. H, stacklinked. C, stacklinkedtest. C stackLinked.h #ifndef STACK_LINKED_H_ #define STACK_LINKED_H_ #ifdef __GNUC__ #define DEPRECATED __attribute__( (deprecated) ) #elif defined(_MSC_VER) #define DEPRECATED __declspec( deprecated ) #else #define DEPRECATED #endif #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) #endif #define ADT […]