Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 need to quickly search my entire filesystem for a string. Is there a program that will index my disk and allow me to do this? I've tried tracker and google desktop, but they don't seem to allow me to recursively index root (/).

share|improve this question
What exactly is your use case? Are you trying to find a filename containing a string, a file containing a string, or just that string anywhere on the disk (including slack space)? – Scott Pack Jan 14 '11 at 2:59
file containting a string – Michael Gummelt Jan 14 '11 at 4:23
up vote 5 down vote accepted

Do you need to quickly search your filesystem for a string just once? Or is this something you need to do all the time? Because if it's just once, you might as well just use grep -- the time it takes grep to search through everything won't be any slower than the time it takes to build an index.

If this is actually something you find yourself doing regularly, then you'll find a number of full-text indexing tools out there, including swish-e, Lucene, Sphinx, and others.

share|improve this answer

find / -type f -exec grep PATTERN {} \;

If this is a workstation, you might want to look into Beagle[0] or whatever it is that has since replaced Beagle.


share|improve this answer

You may find ack to be particularly useful. It combines the find and grep into one tool and searches files selectively based on their type or regexes you provide. It's geared toward source code, but you can have it search all files. The package name in Ubuntu (and Debian) is "ack-grep".

share|improve this answer

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.