Making Better Use of Your .Ackrc File

Many command line utils have a . file that people rarely use. Ack is one of them.

For a project I’m working on, there’s a var folder (ignored in git) where all the logs go. When I perform an ack search, I have no interest in ack looking through the var folder every single time.

By default, ack only checks your ~/.ackrc file for it’s default switches. You can have per directory ack settings if you add this to your .bash_profile:

export ACKRC=".ackrc"

Now you don’t have to worry about random log file being searched every time you try to find something.

new-host-3:dev  jhaddad$ cat .ackrc

Just add whatever switches you want, one per line.