• Linux学习笔记之tail命令显示最后n行


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

    用于linux查看日志的时候很方便,假如日志文件为:Console.log
    用法:
    1. tail Console.log

    tail
    # 输出文件最后10行的内容

    2.  tail -f Console.log

    tail -f
    # 输出最后10行内容,同时监视文件的改变,只要文件有一变化就显示出来。

    3.  tail -nf Console.log  --n为最后n行

    tail -nf
    # 输出文件最后n行的内容,同时监视文件的改变,只要文件有一变化就同步刷新并显示出来

    4.  tail -n 10 filename

    tail -n 10
    #输出文件最后10行的内容
  • 相关阅读:
    BZOJ-3495 前缀优化建图2-SAT
    洛谷P3979 遥远的国度 树链剖分+分类讨论
    hdu
    hdu
    poj
    poj-1330(暴力写的lca)
    树链剖分
    Dijkstra
    Floyed
    最短路径
  • 原文地址:https://www.cnblogs.com/JetpropelledSnake/p/10869248.html
Copyright © 2020-2023  润新知