1

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 (/).

3 Answers3

5

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.

larsks
  • 41,276
  • 13
  • 117
  • 170
1

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.

[0] http://beagle-project.org/Main_Page

bdha
  • 164
  • 5
1

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".

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148