Linux tail 命令

显示 notes.log 文件的最后 10 行,请输入以下命令:

tail notes.log

跟踪名为 notes.log 的文件的增长情况,请输入以下命令:

tail -f notes.log

显示文件 notes.log 的内容,从第 20 行至文件末尾:

tail +20 notes.log

显示文件 notes.log 的最后 10 个字符:

tail -c 10 notes.log

 显示最后100行数据

tail -n 100 /etc/cron  

显示第100行到末尾行

tail -n -100 /etc/cron 

参考:

https://www.runoob.com/linux/linux-comm-tail.html

原文地址:https://www.cnblogs.com/sea-stream/p/11273479.html