Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers 3

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.