Making Better Use of your .ackrc file

RustyRazorblade Consulting RustyRazorblade Consulting
1 min read

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:

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
--ignore-dir=var/

Just add whatever switches you want, one per line.

RustyRazorblade Consulting

RustyRazorblade Consulting

Apache Cassandra Consultant and Distributed Systems Expert

Related Posts

Need Expert Help with Apache Cassandra?

Get professional consulting for your distributed systems challenges. Performance optimization, architecture design, and troubleshooting.