A utility similar to grep -r ...
but focused on raw speed and utilization of system resources. This tool
is useful for quickly scanning large directories for files containing a specific string.
The intro gif is fastgrep scanning the entire, un-indexed, 1.15.1 craftbukkit
sources on a Kali Linux install
running on an 4-core laptop CPU (the i7-8550U @ 1.8GHz
) for the string "createInventory". That is around 1 million
lines of code searched in under 100ms. The same scan would take grep several minutes.
$ cd ~/craftbukkit-1.15.1-src
$ cloc .
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Java 8099 200332 4926 959246
-------------------------------------------------------------------------------
SUM: 8099 200332 4926 959246
-------------------------------------------------------------------------------
This functionality can be very useful for developing or modding large, documented, codebases (e.g. open-source or reverse engineered games, operating systems, etc.).
For more info see this.
- Building: cmake, gcc
- Running: argp, pthread
curl -fsSL https://raw.githubusercontent.com/divisionind/fastgrep/master/get_fastgrep.sh -o get_fastgrep.sh
sudo sh get_fastgrep.sh
- Clone repo
git clone --recursive https://github.com/divisionind/fastgrep.git
- Enter directory
cd fastgrep
- Build locally and install
sudo sh install.sh
NOTE: The install script assumes apt as the package manager. If you are running a different package manager, install the requirements and remove that section of the install script.
- Download the latest windows installer from the releases page
- Run the installer, make sure you select
Add fastgrep to the system PATH for all users
, complete installation
- XMR:
83vzgeeKebLh6pj2YtBqn7PqxY47CkyzmLzUhmHfhTCQdj9Mfad4FUF12Yu9ry5uUh5JASTcXg5Fwji5ibjUngw9LomnH6Z
- ETH:
0x1bdA7dB6484802DFf4945edc52363B4A8FAcb470
- ETC:
0x4a368bb4cd854f650169ce207268c303ffecafb2