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

The find command is taking too long on my machine to complete. When I use time command, I find that sys time and user time are too small as compared to real time. Is my find process not getting scheduled properly?

I interrupted the neverending find command and got the following statistics:

Real time : 5min
Sys time : 1.1 sec
User time : 3 sec

I was running

find / -name ls 2>/dev/null
share|improve this question
up vote 7 down vote accepted

for the find command, disk IO is likely to be a much more significant bottleneck than CPU time.

compare your

find / -name ls 2>/dev/null   

with the equivalent

locate ls | grep "/ls$"


locate -r "/ls$"

or (fastest for finding location of commands on your path)

which ls
share|improve this answer

Wanted to add my two cents... You might want to look at using mlocate. It will cache the files on your system and allow you to use the 'locate' command to quickly find what you're looking for. And you can update the cache by using the 'updatedb' command. The only disadvantage is that it isn't as easy used in scripts as find because it requires root privs by default to use.

Find doesn't cache anything, it will just rescan every time. Like what RedGrittyBrick said, your disk will cause the bottleneck in your system.

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.