Follow multiple log files

Stream multiple log files interleaved in one terminal

tail -f /var/log/syslog /var/log/auth.log

tool
linux133 commands
tags
linuxlogs

More linux commands

  • zgrep -i 'error' /var/log/syslog.*.gz

    grep inside .gz files without manual decompression

  • logrotate -f /etc/logrotate.conf

    Force log rotation regardless of schedule

  • for u in $(cut -f1 -d: /etc/passwd); do crontab -l -u $u 2>/dev/null | grep -v '^#' | sed "s|^|$u: |"; done

    Print active cron lines for every user

  • systemd-analyze calendar '*/5 * * * *'

    Parse and show next 5 trigger times for a cron expression

  • command > /tmp/out.log 2> /tmp/err.log

    Split stdout and stderr into separate files

all 133 linux commands