If you want to find matches in the entire file (not just the tail), and you want it to sit and wait for any new matches, this works nicely:
tail -c +0 -f | grep --line-buffered
The -c +0
flag says that the output should start 0
bytes (-c
) from the beginning (+
) of the file.