Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ack-grep installed on my local machine, and find it indispensable for quickly 'acking' through a codebase when debugging.

However, on my cheap shared hosting, there is no ack-grep. One of the testimonials on mentions a

Rube Goldberg mess of find/grep/xargs

which sounds like what I need, but coming from the opposite direction.

Does anyone know what it might be?

share|improve this question
up vote 4 down vote accepted

The actual command is named ack. (Some distributors may have renamed it to ack-grep due to name collisions.) The official website is indeed, and it has a long list of installation methods, even in case your distribution does not have ack.

For example, you can download App::Ack from Perl's CPAN (using cpanminus):

cpanm --sudo App::Ack

Or get the "standalone" version:

curl > ~/bin/ack
chmod +x ~/bin/ack
share|improve this answer
Stunning, thanks. Linux FTW – user908393 Aug 25 '11 at 11:22

Yes, you can do it manually, and in fact you should know how to do it manually. For example, if you've been doing

ack function_name --php

you can do that (pretty much) as

find . -name '*.php' | xargs grep function_name

It's longer to type, and you can make an alias or shell script out of it, but it's good to know how to do it, just for the sake of knowing how to do it.

Your question makes me smile because usually what I hear is old guard Unix greybeards saying "You don't need ack, just use find, xargs and grep." It's cool to see someone coming at it from the other direction.

share|improve this answer
Awfully close to "You don't need that newfangled wheel, just reinvent your own." – grawity Aug 25 '11 at 15:50
It certainly is, but it's a battle I've stopped getting into. If people want to do it the old way because That's How Ken And Dennis Say It Should Be, then that's up to them. – Andy Lester Aug 25 '11 at 22:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.