zfgrep
Matches fixed strings in possibly compressed files. Equivalent to grep -F with input decompressed first if necessary. More information: <https://manned.org/zfgrep>.
Install
- All systems
-
curl cmd.cat/zfgrep.sh
- Debian
-
apt-get install gzip
- Ubuntu
-
apt-get install gzip
- Alpine
-
apk add gzip
- Arch Linux
-
pacman -S gzip
- Kali Linux
-
apt-get install gzip
- CentOS
-
yum install gzip
- Fedora
-
dnf install gzip
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install gzip
- OS X
-
brew install gzip
- Raspbian
-
apt-get install gzip
- Dockerfile
- dockerfile.run/zfgrep
- Docker
-
docker run cmd.cat/zfgrep zfgrep
powered by Commando
Matches fixed strings in possibly compressed files. Equivalent to grep -F with input decompressed first if necessary. More information: <https://manned.org/zfgrep>.
-
Search for an exact string in a file:
zfgrep search_string path/to/file
-
Count the number of lines that match the given string in a file:
zfgrep --count search_string path/to/file
-
Show the line number in the file along with the matching lines:
zfgrep --line-number search_string path/to/file
-
Display all lines except those that contain the search string:
zfgrep --invert-match search_string path/to/file
-
List only filenames whose content matches the search string at least once:
zfgrep --files-with-matches search_string path/to/file1 path/to/file2 ...
© tl;dr; authors and contributors