ag has some advantages over ack, or grep.
- Excludes files from VCS ignore files (e.g.
- Searches compressed files
You can learn some basics in CONQUERING THE COMMAND LINE book (free) by Mark Bates. I found it yesterday and it's really good!
In 2.8 Performance Mark compared ag and ack.
As it was tested against older Rails code, let me show you my output:
time ack DHH
time ag DHH
Tested on MacBook Air (11-inch, Early 2014)
Going Beyond grep for Searching Source Code is also a good read.