how to use tail with grep in linux code example Example: grep tail tail -f file | grep --line-buffered my_pattern