I'm using CentOS6.4 and updatedb is running as a daily job. What should I do if I want to know how long it takes for updatedb to run?

1 Answer 1


You can use the time bash builtin. Consider this example and modify the cron job accordingly:

$ time ( ls -lrt &>/dev/null )

real    0m0.002s
user    0m0.000s
sys     0m0.001s

You can also redirect the output somewhere else:

time ( $CRON_JOB_CODE ) &> /var/log/updatedb.time.log

You must log in to answer this question.

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