Occasionally, I have to search lots of files for a pattern. It was only recently I discovered the wonderful silver searcher utility which saves me a lot of time.

To install ‘ag’ on Fedora, use the following (which isn’t entirely obvious or intuitive if you’re used to typing ‘ag’).

# sudo dnf install the_silver_searcher

I believe there is an Emacs interface which would save me even more time.

$ time ag 'sql statement execute time' ~

real    0m0.125s
user    0m0.128s
sys     0m0.257s

$ time find ~ -type f -print0 | xargs -0 grep -i 'sql statement execute time'

real    0m23.725s
user    0m7.965s
sys     0m1.618s