Indexed grep - fast search (grep like) in huge stack of files.
Author: Mike Szymaniak
greps -B, -A and -C switches);greps switches are implemented;Assuming above requirements are met
mkdir build
cd build
cmake ..
make
make install
For more information see installation guide
First we need to generate index database. Under POSIX system:
find . -type f | gripgen
Or under Windows:
dir /b /s /a:-d | gripgen
It will create database directory .grip. Binary files (these containing zero byte) will be ignored.
In case of great number of files, this step will take some time. Indexer typically process 100 to 1000 files per second, and the resulting database size will be about 10% of the indexed data.
You could also provide file list to index
gripgen list.txt
Indexed files must be located inside current directory and its subdirectories.
Now you could perform search, e.g.:
grip printf
grip -E '(foo|bar)-[a-z]*'
grip -i -C3 'hello world'
grip --list main
For more usage information type grip --help.
Hacker News (1)
C++
93.1%
CMake
4.3%
C
1.9%
Indexed grep - fast search (grep like) in huge stack of files.
Author: Mike Szymaniak
greps -B, -A and -C switches);greps switches are implemented;Assuming above requirements are met
mkdir build
cd build
cmake ..
make
make install
For more information see installation guide
First we need to generate index database. Under POSIX system:
find . -type f | gripgen
Or under Windows:
dir /b /s /a:-d | gripgen
It will create database directory .grip. Binary files (these containing zero byte) will be ignored.
In case of great number of files, this step will take some time. Indexer typically process 100 to 1000 files per second, and the resulting database size will be about 10% of the indexed data.
You could also provide file list to index
gripgen list.txt
Indexed files must be located inside current directory and its subdirectories.
Now you could perform search, e.g.:
grip printf
grip -E '(foo|bar)-[a-z]*'
grip -i -C3 'hello world'
grip --list main
For more usage information type grip --help.
Hacker News (1)
C++
93.1%
CMake
4.3%
C
1.9%