rak, ack and findit
on December 13, 2007 @ 04:52 AM

In Helpful Command Line Tools from last month I posted on my custom findit script.

Jason Porrit commented on that post and mentioned ack , a perl alternative to grep and find which offers terminal color highlighting to your results. I also found this morning a ruby alternative called rak

All of these utilities do the same thing, they search a directory structure for files whose contents match a given pattern.

Here’s Ack

Here’s Rak

Here’s findit

Overall ack and rak beat out findit, but findit has a much better name. I think I’ll just alias findit to rak. (yes I”m biased to ruby code over perl code).

The only thing ack and rak are missing is a filename only option. If I can find every file matching a pattern from a given start directory that would rid me of findfile as well!


  1. Ben Smith 12.13.07 / 14PM

    Hi there,

    FYI, rak does have a filename-only option : rak -l TODO.

  2. Zach Dennis 12.14.07 / 00AM

    The -l option prints the filename, but I want to search the filename. For example I want to find all files whose name matches “rhtml” in a given directory tree.

  3. Daniel Lucraft 12.27.07 / 10AM

    Hi Zach, you can find the files you want with “rak -f -g rhtml”.