Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Handy grep

Prints out in which files the match ("Exception") was found:

grep -r -l Exception /var/log/all.log.*

Print 30 lines surrounding match ("Exception):

cat /var/log/all.log.20 | grep -C 30 "Exception"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.