【问题标题】:How to show only newly logged content in tail -f?如何在tail -f中仅显示新记录的内容?
【发布时间】:2013-05-08 05:24:44
【问题描述】:

通常tail -f 显示 10-15 个已记录的内容。我怎样才能避免它?我只想查看新记录的内容。 tail 命令中是否有任何开关?请指教。

【问题讨论】:

    标签: linux unix command tail


    【解决方案1】:

    只需设置返回零行:

    tail -n 0 -f /var/log/syslog
    

    男人尾巴:

       -n, --lines=K
              output the last K lines, instead of the last 10; or use -n +K to output lines starting with the Kth
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-08
      相关资源
      最近更新 更多