tail-f/var/log/syslog
tail-f/var/log/syslog-n200# start with last 200 linestail-ffile1.logfile2.log# follow multiple files# multitail — follow multiple files in split panesaptinstallmultitail
multitailfile1.logfile2.log
multitail-s2file1.logfile2.log# side by side
# Search for a patterngrep"ERROR"app.log
grep-i"error"app.log# case-insensitivegrep-v"DEBUG"app.log# exclude linesgrep-A3-B3"Exception"app.log# 3 lines of context# Count occurrences per patterngrep-c"ERROR"app.log
# Extract and count unique IPs (e.g. Apache logs)awk'{print $1}'access.log|sort|uniq-c|sort-rn|head20# Count HTTP status codesawk'{print $9}'access.log|sort|uniq-c|sort-rn
# Show lines between two timestampsawk'/2024-01-01 10:00/,/2024-01-01 11:00/'app.log
# Sum a numeric field (e.g. response time in column 10)awk'{sum += $10} END {print sum/NR " avg"}'access.log
# 1 MB of fake logsdockerrun-it--rmmingrammer/flog-b1048576>1_mega.log
# Continuous Apache logs, one per 2sdockerrun-it--rmmingrammer/flog-fapache_combined-tstdout-n2-l
Supports multiple formats (apache_combined, apache_error, rfc3164, rfc5424, json). See the README.