Linux command
lzegrep 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Search with extended regex
lzegrep [pattern] [file.lz]
Case-insensitive search
lzegrep -i [pattern] [file.lz]
Show line numbers
lzegrep -n [pattern] [file.lz]
说明
lzegrep searches for extended regular expression patterns in lzip-compressed files. It is equivalent to lzgrep -E and internally pipes decompressed data through grep -E (or egrep). Uncompressed files are searched directly.
参数
- -i
- Case-insensitive matching.
- -n
- Prefix each matching line with its line number.
- -v
- Invert match; show lines that do not match.
- -c
- Print only the count of matching lines per file.
- -l
- Print only the names of files containing matches.
- -h
- Suppress file name prefixes in output.
- -H
- Force file name prefixes in output.
- -e _PATTERN_
- Use _PATTERN_ as the search pattern; useful for multiple patterns.
FAQ
What is the lzegrep command used for?
lzegrep searches for extended regular expression patterns in lzip-compressed files. It is equivalent to lzgrep -E and internally pipes decompressed data through grep -E (or egrep). Uncompressed files are searched directly.
How do I run a basic lzegrep example?
Run `lzegrep [pattern] [file.lz]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i do in lzegrep?
Case-insensitive matching.