Igrep CLI tool is an indexed version of base Unix grep that allows index file before searching and then run fast searching using full-inverted index
- Index file or whole directory
- Remove files from index
- Fast searching query by indexed files
- Supported extensions:
- txt
- json
- ini
- csv
- log
Usage: igrep [OPTION] [PARAM]
Possible options and flags:
create — Create new index file
-d, --destination <PATH>— Specify path for index file. Optional (default: ~/.config/igrep/index.bin)- Example:
igrep create -d ~/myindex.bin
- Example:
index — Add files to index
-f, --file <PATH>— Index single file.- Example:
igrep index -f ./data.txt
- Example:
-d, --dir <PATH>— Recursively index all files in directory.- Example:
igrep index -d ./logs
- Example:
-s, --source-index <PATH>— Specify path to source index file. Optional (default: ~/.config/igrep/index.bin)- Example:
igrep index -d ./logs -s ~/myindex.bin
- Example:
remove — Remove file from index
-f, --file <PATH>— Remove file from index.- Example:
igrep remove -f ./old-file.log
- Example:
-s, --source-index <PATH>— Specify path to source index file. Optional (default: ~/.config/igrep/index.bin)- Example:
igrep remove -f ./old-log.txt -s ~/myindex.bin
- Example:
find — Find using index
-q, --query <QUERY>— Find query by indexed files.- Example:
igrep find -q "ERROR"
- Example:
-s, --source-index <PATH>— Specify path to source index file. Optional (default: ~/.config/igrep/index.bin)- Example:
igrep find -q "ERROR" -s ~/myindex.bin
- Example:
-h, --help — Show manual.
-v, --version — Show version.
Download .deb package from latest release manualy
or using next command:
curl -O -L https://github.com/Cardinal87/igrep/releases/latest/download/igrep-linux.deband then install:
sudo dpkg -i igrep-linux.debRun igrep in terminal to ensure that all installed correctly
To remove igrep run:
sudo dpkg -r igrepClone repository:
git clone [email protected]:Cardinal87/igrep.gitInstall requirement packages
sudo apt update
sudo apt install -y build-essential cmakeand build source code
cd igrep
mkdir build
cd build
cmake ../igrep
cmake --build .After this you can install it with
cmake --install . --prefix /specify/prefered/path