|
|
|
|
|
by ser0
1718 days ago
|
|
For me The Silver Searcher (Ag) has replaced trying to memorise various grep flags. Its defaults produce largely what I'm looking for without needing any flags. On occasions where I do need more advanced features such as excluding file patterns or directories, I find the man page to be pretty easy to understand. |
|
In addition, A+ for the ag's design for `mmap()` ing files instead reading them into a buffer.
Bench marks: Using Grep
```bash $ time grep -Rsn "kthreadd" ... real 0m25.341s user 0m5.738s sys 0m4.074s ```
Using ag: ```bash $ time ag "kthreadd" ...
real 0m2.182s user 0m1.306s sys 0m1.773s ```