Home>Article>Operation and Maintenance> How to view log commands in Linux in real time

How to view log commands in Linux in real time

coldplay.xixi
coldplay.xixi Original
2020-08-28 10:00:55 15241browse

How to view the log command in Linux in real time: To view a file or a log file, usually use [more xx.log] or cat to view it. If you need to view the running log in real time, use the tail command to view it. The code is: [tail -f xx.log].

How to view log commands in Linux in real time

[Related article recommendations:linux tutorial]

How to view the log command in Linux in real time:

To view a file or a log file, we usually usemore xx.logorcatto view it. However, sometimes we need to view it in real time. Running log, we can use thetailcommand to view it at this time.

The command is as follows:

tail -f xx.log

View the effect:

How to view log commands in Linux in real time

##Related learning recommendations:

linux video tutorial

The above is the detailed content of How to view log commands in Linux in real time. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn