ack

ack is a tool designed as a replacement for 99% of the uses of grep. It is faster, more portable, and friendlier to the programmer. By default, ack only searches source files — skipping .git, binary files, and other clutter you never want to search anyway.

Why ack?

  • Searches only relevant source files by default
  • No need to specify file extensions — ack knows what source code looks like
  • Perl-compatible regular expressions
  • Readable output with file names and line numbers grouped together
ack searching a codebase
ack searching a codebase

Basic usage

ack pattern
ack --perl pattern      # search only Perl files
ack -l pattern          # list only matching filenames
ack -i pattern          # case-insensitive search