Get a list gz files having a certain string without decompressing it
Linux
find . -iname '*.gz' -print0 | xargs -0 zgrep PATTERN
Mac
find . -iname "*.gz" -exec zgrep -l PATTERN {} +
Written by Vic
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#