π Log Pattern Search with Context
Find errors across multiple log files in seconds
Search multiple log files for patterns with surrounding context lines. Smart time-range filtering, case-insensitive option, and color output make debugging much faster than grep + manual context-finding.
Features
- β Search across multiple log files in one go
- β Configurable context lines before/after each match
- β Time-range filter (-s 1h, -s 24h, -s 7d)
- β Case-insensitive search
- β Color-coded output, grouped by file
Usage
./log-tail-search.sh -p "Out of memory" -d /var/log
./log-tail-search.sh -p "Failed password" -s 24h -i
./log-tail-search.sh -p "error" -f syslog,messages -n 5
Download
Get the script from the Free Tools Pack, or grab it directly:
# Clone from the repo (scripts are in /products/free/)
curl -O https://pragmaticsysadmin.help/downloads/log-tail-search.sh
chmod +x log-tail-search.sh
./log-tail-search.sh --help
License
MIT β use, modify, redistribute.
Support
Bugs or questions: pragmatic@pragmaticsysadmin.help
More tools
See /shop/ for the full catalog, including paid toolkits:
- The 5-Minute Server Health Check Toolkit ($9) β the “do everything” Monday morning ritual
Made with care by Pragmatic Sysadmin.