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