Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Do you know any way to speed up file searching with a shell?

There is a lot of possibilities: find, which, whereis, ...

find seems to be the most useful, but it's very slow. Perhaps, I don't know the best way to use this functionality. How to find files faster?

share|improve this question

migrated from Mar 28 '12 at 4:44

This question came from our site for professional and enthusiast programmers.

Probably more appropriate for Super User – Doug Harris Mar 25 '12 at 1:47

which and whereis search for executables in your path - that's a pretty significant limitation if you're looking for something other than a program.

find does have lots of flexibility, but it executes the search when you run it without the help of indices.

locate works more quickly because it uses an indexed database of files. The down side to this is that it won't find files that are newer than the last database update. The db update is typically done regularly via a cron job.

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.