daoluan
V2EX  ›  问与答

linux 你用什么命令查看实时更新的日志

  •  
  •   daoluan · Sep 24, 2014 · 6335 views
    This topic created in 4266 days ago, the information mentioned may be changed or developed.
    譬如我需要查看 id 为 xxx 用户的所有日志,在 console 里面实时显示。每次用 vim 查看好麻烦。
    9 replies    2014-09-24 13:03:08 +08:00
    luckywulin
        1
    luckywulin  
       Sep 24, 2014
    tail
    pfitseng
        2
    pfitseng  
       Sep 24, 2014
    tail -f
    mahone3297
        3
    mahone3297  
       Sep 24, 2014   ❤️ 1
    tailf
    daoluan
        4
    daoluan  
    OP
       Sep 24, 2014
    我自己分享一下:
    tailf -n 100 log.file | grep what_you_want.
    reeco
        5
    reeco  
       Sep 24, 2014
    tail -f
    jedyu
        6
    jedyu  
       Sep 24, 2014
    tail -f
    cloudbeyond
        7
    cloudbeyond  
       Sep 24, 2014
    @daoluan tail -f log.file | grep what_you_want
    wisatbff
        8
    wisatbff  
       Sep 24, 2014
    @daoluan 这个不行吧,假如新追加了超过100行呢
    leiz
        9
    leiz  
       Sep 24, 2014
    tailf
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2804 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 14:47 · PVG 22:47 · LAX 07:47 · JFK 10:47
    ♥ Do have faith in what you're doing.