Question: I'm trying to find out what modules [`use Test::Version`](http://search.cpan.org/dist/Test-Version/lib/Version.pm) in cpan. So I've used [`minicpan`](http://search.cpan.org/dist/CPAN-Mini/bin/minicpan) to mirror it. My problem is that I need to iterate through the archives that are downloaded, and grep the files that are in the archives. Can anyone tell me how I might do this? preferably in a way that tells me which file in the archive and what line it's on.

*(note: they aren't all tarballs some are zip files)*

Answer: 
[ugrep](https://github.com/Genivia/ugrep) recursively searches compressed files (gz/Z/bz2/lzma/xz/lz4/zstd) and archives (cpio/tar/pax/zip) with option `-z`. Options `-z --zmax=2` searches compressed files and archives embedded within compressed files and archives (hence zmax=2 levels).
Use find to locate all necessary files, and that zgrep to look into compressed files:

```
find <folder> -type f -name "<search criteria[*gz,*bz...]>" -execdir zgrep -in "<grep expression>" '{}' ';'

```

Didn't test this on tarballs though