Follow a log file live and filter by keywords
tail -f show only errors | filter log live | watch only certain log lines | tail and grep log file | tail | grep | real-time | troubleshootingtail -f /var/log/syslog | grep --line-buffered -iE "error|warn|fail"Follows a log file in real time and lets through only lines matching the pattern (case insensitive). Separate multiple terms with |. --line-buffered makes every matching line appear immediately instead of waiting until the buffer is full.
Note: tail -F instead of tail -f keeps following the file after a log rotation.
Also searched as
- tail -f show only errors
- filter log live
- watch only certain log lines
- tail and grep log file