LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xzfgrep

Search compressed files for fixed strings

TLDR

Search fixed string in xz files
$ xzfgrep "[string]" [file.xz]
copy
Search multiple strings
$ xzfgrep -e "[str1]" -e "[str2]" [file.xz]
copy
Case-insensitive search
$ xzfgrep -i "[string]" [file.xz]
copy
Count matching lines
$ xzfgrep -c "[string]" [file.xz]
copy
Show line numbers
$ xzfgrep -n "[string]" [file.xz]
copy

SYNOPSIS

xzfgrep [option...] [pattern] [file...]

DESCRIPTION

xzfgrep searches compressed files for fixed strings. It is equivalent to xzgrep -F, meaning patterns are not interpreted as regular expressions. This makes it faster than xzgrep for literal string searches.The file compression format is detected from the filename suffix. Files compressed with xz, lzma, gzip, bzip2, lzop, zstd, or lz4 are automatically decompressed before searching. Unrecognized suffixes are assumed to be uncompressed.All options are passed directly to grep(1). The options -r, -R, -d, -Z, and -z are not supported.When no file is specified, standard input is read. From standard input, only xz-compressed data is supported.

INSTALL

sudo apt install xz-utils
copy
sudo dnf install xz
copy
sudo pacman -S xz
copy
sudo apk add xz
copy
sudo zypper install xz
copy
brew install xz
copy
nix profile install nixpkgs#xz
copy

SEE ALSO

xzgrep(1), xzegrep(1), xz(1), fgrep(1), grep(1), zgrep(1), zfgrep(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid