Today, when deploying a project to a Linux server, it has been an error, but there is no record in the log file. But there was no error in the local test, there was no error on the Windoesserver server, there was no reason to find it, so I wanted to see the running logs of Tomcat in real time.
1, first switch to: cd usr/local/tomcat5/logs2-F Catalina.out3, so the runtime can view the running log in real time
CTRL + C is the exit Tail command.
Alt+e+r Reset.
By the way, the tail command tail command in Linux writes the file to standard output starting at the specified point. Using the-f option of the tail command makes it easy to see which log file is being changed, and tail-f filename will display the most trailer in filename on the screen. And not only refreshes, so you see the latest file content. 1. command format; tail[necessary parameters [selection parameters] [file] 2. Command function: used to display the end of the specified file, do not specify the file, as input information for processing. Common view log files. 3. Command parameter:-F Loop Read-Q does not display processing information-v displays verbose processing information-c< number > bytes displayed-n< lines > Display rows--pid=pid is combined with-F to end after the process id,pid dead. -Q,--quiet,--silent never outputs the header-S of the file name,--sleep-interval=s and-F are combined to indicate a sleep s-second interval of 4 per repetition . Use instance: Instance 1: Show the last 5 lines of the file command:tail-n 5 Log2017.log
Live view of Tomcat run logs under "Tomcat" Linux