↑ ↓ select, Enter open, Esc close

Follow a log file live and filter by keywords

Adjust the values, the command updates live
root@server
tail -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

Related one-liners

All in Logs

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.