Skip to content

Instantly share code, notes, and snippets.

@krisleech
Last active November 28, 2017 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisleech/83508b61ada44873f9a2323954880ce0 to your computer and use it in GitHub Desktop.
Save krisleech/83508b61ada44873f9a2323954880ce0 to your computer and use it in GitHub Desktop.
grep in gzipped logs

We have log files which are gzipped with a incrementing number.

production.log.1.gz
production.log.2.gz
production.log.3.gz
...
production.log.99.gz

To grep in those logs:

zgrep "Started GET \"/charts" production.log.*.gz

Also see zcat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment