FG
💻 Software

How to do the equivalent of "grep something * -Rin" on list of tar.gz files?

Fresh5 days ago
Mar 15, 20263138 views
Confidence Score0%
0%

Problem

I've got a bunch of tar.gz files and I want to do a "grep something * -Rin" as I would on them if they weren't tar.gzed. I want to keep them tar.gzed as they are, but grep on them on-the-fly and find the occurrences of my grep with the prefixed file and line number. Something like: and get somethin…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to do the equivalent of "grep something * -Rin" on list of tar.gz files?

Low Risk

zgrep (or, we believe, grep with the -Z flag) will let you grep the compressed files and I think will tell you much of what you want, but this doesn't give you the filename without a bit more work looking at the header :(

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment