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?


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.


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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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