The Wayback Machine - https://web.archive.org/web/20230512155134/https://www.geeksforgeeks.org/bzgrep-command-in-linux-with-examples/
Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

bzgrep command in Linux with examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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
Last Updated : 15 May, 2019
Like Article
Save Article
Similar Reads
Related Tutorials