tail

tail :输出文件的最后几行。

用于linux查看日志的时候很方便,假如日志文件为:Console.log
用法:
1. tail Console.log
    输出文件最后10行的内容
2.  tail -n 5 Console.log
    输出文件最后5行的内容
3.  tail -nf Console.log  --n为最后n行(不输入n时默认10行)
    输出文件最后n行的内容,同时监视文件的改变,只要文件有一变化就同步刷新并显示出来

猜你喜欢

转载自www.cnblogs.com/gamelink/p/8997382.html