zfgrep
TLDR
Search for literal string in gzipped file
SYNOPSIS
zfgrep [grep-options] [-e] pattern [file...]
DESCRIPTION
zfgrep searches for fixed strings in gzip-compressed files without manual decompression. It's equivalent to zcat file.gz | fgrep pattern but more convenient.
The "f" indicates fixed string matching (like grep -F). Patterns are interpreted literally, not as regular expressions. This is faster than regex matching and useful when searching for strings containing special characters.
zfgrep automatically handles both compressed and uncompressed files, making it safe for mixed file sets.
Multiple patterns can be specified, one per line, using -e or by newline-separating them.
PARAMETERS
-i
Case-insensitive matching-n
Show line numbers-l
List filenames with matches only-c
Count matching lines-v
Invert match (show non-matching lines)-h
Suppress filename in output-e pattern
Specify pattern-x
Match whole lines only
CAVEATS
Only gzip compression is supported. Use bzfgrep for bzip2 files or pipe through appropriate decompressors for other formats.
Fixed string matching means special characters like .,\*, [ are literal. Use zgrep or zegrep if regex is needed.
Processing large compressed files requires CPU for decompression.


