bzgrep command in Linux with examples
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.
Recommended Posts:
- ar command in Linux with examples
- ex command in Linux with examples
- top command in Linux with Examples
- tar command in Linux with examples
- df command in Linux with Examples
- du command in Linux with examples
- let command in Linux with Examples
- pwd command in Linux with Examples
- gcc command in Linux with examples
- ln command in Linux with Examples
- for command in Linux with Examples
- dc command in Linux with examples
- sum command in Linux with Examples
- cvs command in Linux with Examples
- cmp Command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




