How to 'grep' a continuous stream?

前端 未结 12 1385
清酒与你
清酒与你 2020-11-22 11:15

Is that possible to use grep on a continuous stream?

What I mean is sort of a tail -f command, but with grep on t

12条回答
  •  无人及你
    2020-11-22 11:42

    This one command workes for me (Suse):

    mail-srv:/var/log # tail -f /var/log/mail.info |grep --line-buffered LOGIN  >> logins_to_mail
    

    collecting logins to mail service

提交回复
热议问题