1

grep from tar.gz without extracting [ Faster one]

view story
linux-howto

http://stackoverflow.com – Am trying to grep pattern from dozen files .tar.gz but its very slow am using tar -ztf file.tar.gz | while read FILENAME do if tar -zxf file.tar.gz "$FILENAME" -O | grep "string" > /dev/null then echo "$FILENAME contains string" fi done (HowTos)