bzgrep
Find patterns in bzip2 compressed files using grep. tldr-pages
On several platforms
Several platforms
Search for a pattern within a compressed file
bzgrep "search_pattern" path/to/fileIdentifyRecursively search files in a bzip2 compressed .tar archive for a pattern
bzgrep --recursive "search_pattern" path/to/tar_fileIdentifyPrint 3 lines of Context around, Before, or After each match
bzgrep --context 3 "search_pattern" path/to/fileIdentifyPrint file name and line number for each match
bzgrep --with-filename --line-number "search_pattern" path/to/fileIdentifySearch for lines matching a pattern, printing only the matched text
bzgrep --only-matching "search_pattern" path/to/fileIdentifySearch stdin for lines that do not match a pattern
cat path/to/bz_compressed_file | bzgrep --invert-match "search_pattern"IdentifyUse extended regex (supports ?, +, {}, (), and |), in case-insensitive mode
bzgrep --extended-regexp --ignore-case "search_pattern" path/to/fileIdentify