Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
oftenwrong
on Dec 14, 2022
|
parent
|
context
|
favorite
| on:
Tips for analyzing logs
grep regex /var/log/logfile -05 #To view the 5 lines before *and* after the match
This appears to work with GNU grep, at least, but YSK that the POSIX grep option for this is `-C`.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: