It's like ack or ag, but leverages find(1) and grep(1).
I wrote this primarily because I wanted something whose workings I understood.
If you need to find Ferrous Bueller in your files, this is your utility.
- ack
- ag - the Silver Searcher
- ast-grep
- cgrep
- git grep
- glark
- grab
- greple
- grin
- paragrep
- pss - an ack clone
- pt - the Platinum Searcher
- qgrep
- rak - an ack clone
- rg - ripgrep
- rga - ripgrep, but also searches PDFs, ebooks, Office documents,
.zip
and.tar.gz
files, and more. - sift
- spot
- ucg - UniversalCodeGrep
- ugrep
-I
excludes binary files.-r
recurses into subdirectories without following symlinks.- If you want to follow symlinks, a potentially bad idea,
specify
-R
.
- If you want to follow symlinks, a potentially bad idea,
specify
- You probably also want to specify:
--exclude-dir=node_modules
--exclude-dir=.git
- You may want:
--exclude=\*.pdf
--exclude=\*.doc
--exclude=\*.xls
--exclude=\*.ppt
- https://beyondgrep.com/more-tools/
- https://github.com/BurntSushi/ripgrep#quick-examples-comparing-tools
-
They are pretty heavy front-ends to
grep
andfind
. -
It handles file and directory exclusions better.
-
It has built-in common pattern searches such as
--non-ascii
and--css-class
. -
The ability to allow otherwise excluded file and directory patterns
- To pass along options to
grep
, you have to specify each one individually.