the dmesg command

来源:互联网 发布:html里写php代码 编辑:程序博客网 时间:2024/06/13 18:13
the dmesg command. This command is commonly used with the grep command to filter output. The dmesg command takes its output directly from the /var/log/messages file, so you can choose to either run dmesg or to read the file directly by typing less
/var/log/messages. The output is fairly detailed, so be prepared for an initial shock when you see how much information is generated. You might find it easier to generate a file with the dmesg output by using the following command:
~$ dmesg > dmesg.txt
This takes the output from the dmesg command and stores it in a new text file called dmesg.txt.