Skip to content
Related Articles

Related Articles

Improve Article
bzgrep command in Linux with examples
  • Last Updated : 15 May, 2019

bzgrep is a Linux command used to search for a pattern or an expression but inside a bzip2-compressed file. This command simply passes it’s arguments and the decompressed files to grep. Therefore, all the flags used in the grep command remain same in bzgrep, since they are simply sent to grep as they are. If no file is specified, then the standard input is decompressed if necessary and fed to grep.

Synopsis:

bzgrep [ grep_options ] [ -e ] pattern filename...

Example: Here we take a normal text file, use grep on it. Then we compress it using bzip2 and search the specific pattern in the compressed file with bzgrep.

My Personal Notes arrow_drop_up
Recommended Articles
Page :