功能:tail 命令用于显示文本文档的末尾几行。 示例如下: tail example.txt 显示文档 example.txt 的后十行内容; tail -n 20 example.txt 显示文档 example.txt 的后二十行内容; tail -f example.txt 显示文档 example.txt 的后十行内容并在文档内容增加后,自动显示新增的文档内容。 tail -n 50 -f example....
6、实时监控查看日志末尾N行 #实时查看日志末尾10行 (base) [root@s186 ~]# watch “dmesg | tail -10” 7、查看指定级别格式日志 (base) [root@s186 ~]# dmesg -l warn [ 0.000000] ACPI: RSDP 00000000000f0490 00024 (v02 DELL ) [ 0.000000] ACPI: XSDT 00000000d8fee080 00084 (v01 DELL CB...
3、tail -n +2300 catalina.out | head -n 500 自第2300行起,取500行 eg:grep -n 'update_attRule_evryDayExec' grep -C 13000 '时间串' catalina.out|more
kernel会将开机信息存储在ring buffer中。您若是开机时来不及查看信息,可利用dmesg来查看。开机信息亦保存在/var/log目录中,名称为dmesg的文件里。 参数: -c 显示信息后,清除ring buffer中的内容。 -s<缓冲区大小> 预设置为8196,刚好等于ring buffer的大小。 -n 设置记录信息的层级。 dmesg -s131072> /var/...
Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {{ message }} karelzak / util-linux-work Public forked from util-linux/util-linux Notifications You must be signed in to change notification settings Fork 2 Sta...