← 返回命令列表

Linux command

lzgrep 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Search in lzip-compressed file

lzgrep [pattern] [file.lz]

Case-insensitive search

lzgrep -i [pattern] [file.lz]

Show line numbers

lzgrep -n [pattern] [file.lz]

Search multiple files

lzgrep [pattern] [*.lz]

Extended regex

lzegrep [pattern] [file.lz]

说明

lzgrep searches for patterns in lzip-compressed files. Automatically decompresses before searching. Passes options through to grep. Use lzegrep for extended regex or lzfgrep for fixed strings.

参数

-i
Case-insensitive search.
-n
Show line numbers.
-l
Show only filenames.
-c
Show match counts.
-v
Invert match.

FAQ

What is the lzgrep command used for?

lzgrep searches for patterns in lzip-compressed files. Automatically decompresses before searching. Passes options through to grep. Use lzegrep for extended regex or lzfgrep for fixed strings.

How do I run a basic lzgrep example?

Run `lzgrep [pattern] [file.lz]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -i do in lzgrep?

Case-insensitive search.