How to search in compressed file

qtip-blue


This is the third post talking about compressed files. This time, we will look into how to search within the compressed file, without decompressing it.




Gnuzip compressed file :

zgrep <.tar.gz or .gz compressed file>

e.g.

zgrep "load successful" today-log.tar.gz

*** there are also zegrep (extended regex grep) & fgrep (fixed-string grep) available


Bzip2 compressed file :

bzgrep <.tar.bz2 or .bz2 compressed file>

e.g.

bzgrep "loaded" logs.tar.bz2

*** there are also bzegrep (extended regex grep) & bfgrep (fixed-string grep) available


Farvel !!!

More post - related

Please sponsor my coffee if you find my posts worth reading, thanks!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
-->
Improve the web with Nofollow Reciprocity.