I am using the zutils version of zgrep v0.9 (not the gzip wrapper script) and to recursively grep zip files starting from the current folder I simply use:

zgrep -r "MY_STRING" .

This works fine. However, it does not search zip files within zip files.

How do I grep recursively across a directory and recursively search zip files within zip files?


The zgrep utility from zutils doesn't support zip files at all. It treats them as ordinary files, so it won't find anything except in members that are stored in raw format (which mostly happens for very small files).

The zipgrep utility distributed with unzip doesn't search zip files recursively.

For how to solve your actual problem, see How do I recursively grep through compressed archives?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.