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