Super User is a question and answer site for computer enthusiasts and power users. 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'm used to using Spotlight on OSX.

Is there anything equivalent for a generic *nix terminal? I'm aware of GNU Find, but it's slow!

Is there a fast indexed search-in-files program?

share|improve this question

Yes, locate(1). A cron job rebuilds the index (nightly, I believe, but I'm not sure of the frequency) with the updatedb command. You shouldn't need to run that yourself, but you can if you recently added a lot of files and want the index to be up-to-date.

share|improve this answer

It depends on which UNIX flavor you are using (Solaris, *BSD, Linux) and if you have that tool installed. Try locate. To update its database run updatedb as root.

share|improve this answer

I believe Spotlight can search for specific words in the content of files, locate cannot.

See Using an index to make grep faster? if you need to find files whose contents (not their file-names) contain specific words.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .