1, tail -f log files - Dynamic Printing recent log file. tail -300f log file, i.e. the dynamic printing the last n lines (this example is line 300) the log file.
2, grep -C 100 key filename- keyword search print out a log file in the log before and after the n-th row.
3, tail -300f log file | grep 'Keywords' has been dynamic print a log file keyword. When there is a problem online, you know what logs are critical errors, and can trigger this error log to know the way, very good use.
Linux very useful three log printing (must grasp)
Guess you like
Origin blog.csdn.net/weixin_43137113/article/details/104625395
Recommended
Ranking