Last active
August 29, 2015 14:24
-
-
Save remeika/dbc0a669216588715ef0 to your computer and use it in GitHub Desktop.
Grep through all log files, compressed and otherwise.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's say you've got some log files that look like this: | |
# my.log | |
# my.log.1 | |
# my.log.2.gz | |
# my.log.3.gz | |
# To seach for text across all log files, just do this: | |
find . -name "my.log*" -exec zcat "{}" + | grep 'log line text' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment