LinuxCommandLibrary

lzgrep

searches for patterns in lzip-compressed files

TLDR

Search in lzip-compressed file

$ lzgrep [pattern] [file.lz]
copy
Case-insensitive search
$ lzgrep -i [pattern] [file.lz]
copy
Show line numbers
$ lzgrep -n [pattern] [file.lz]
copy
Search multiple files
$ lzgrep [pattern] [*.lz]
copy
Extended regex
$ lzegrep [pattern] [file.lz]
copy

SYNOPSIS

lzgrep [options] pattern [file...]

DESCRIPTION

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.

PARAMETERS

-i

Case-insensitive search.
-n
Show line numbers.
-l
Show only filenames.
-c
Show match counts.
-v
Invert match.
All grep options are supported.

SEE ALSO

lzip(1), grep(1), zgrep(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community