Searching in a .tar.gz without bloat
http://stackoverflow.com/a/13042529 A large .tar.gz can be searched using the above. It is not good enough to simply use e.g. zgrep, b/c the tar binary format makes it difficult to determine what part of the file the match is found on.
As an example, searching through all the files in this .tar.gz for a specific pattern is accomplished with some inelegant use of echo:
while read filename; do echo $filename;tar -xzOf noip-duc-linux.tar.gz $filename | grep -n --color getifaddr; done
SNIP noip-2.1.9-1/Makefile 13:# for Mac OS X and BSD systems that have getifaddr(), uncomment the next line 14:#ARCH=bsd_with_getifaddrs 16:# for early BSD systems without getifaddrs(), uncomment the next line noip-2.1.9-1/._noip2.c noip-2.1.9-1/noip2.c 76: + added getifaddrs() for recent BSD systems (Peter Stromberg) 164:#ifdef bsd_with_getifaddrs 2318:#ifdef bsd_with_getifaddrs 2321: if (getifaddrs(&ifap) != 0) { 2322: perror("getifaddrs()"); noip-2.1.9-1/._README.FIRST noip-2.1.9-1/README.FIRST SNIP