Tail -f + grep? [duplicate] Tail -f + grep? [duplicate] unix unix

Tail -f + grep? [duplicate]


You will find another SO Question helpful: How to 'grep' a continuous stream?

Turn on grep's line buffering mode.

tail -f file | grep --line-buffered my_pattern


If this is a logfile it may be rotated. It will then stop giving data.
This will not stop if file is rotated.

tail --follow=name /var/log/syslog | grep "some data"