Use the bzgrep command of linux to search for the contents of files in the .bz2 package
Editor to share with you the use of linux's bzgrep command to search .bz2 compressed file content, I hope you will learn a lot after reading this article, let's discuss it together!
The bzgrep command uses regular expressions to search for files in the ".bz2" package to display matching lines to the callout.
The bzgrep command itself does not have any options, but it supports all the options of the grep command. The options on the command line are passed directly to the grep command.
The bzgrep command has the same function as the bzegrep command and the bzfgrep command.
Syntax format: bzgrep [parameters] [file]
Common parameters:
Reference example
Ignore case search:
[root@linuxcool] # bzgrep-I Linuxcool linuxcool.bz2
Output only search results with "linuxcool":
[root@linuxcool ~] # bzgrep-c linuxcool linuxcool.bz2
Match the whole word search "linuxcool":
[root@linuxcool] # bzgrep-w linuxcool linuxcool.bz2 has finished reading this article. I believe you have a certain understanding of using linux's bzgrep command to search the files in the .bz2 package. Want to know more about it. Welcome to follow the industry information channel. Thank you for reading!