Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Why does running time and /usr/bin/time give different results?


thomas@tbdesktop:~$ /usr/bin/time -f "Elapsed time:%E" wc /etc/hosts
  9  25 224 /etc/hosts
Elapsed time:0:00.04


thomas@tbdesktop:~$ time -f "Elapsed time:%E" wc /etc/hosts
-f: command not found

real    0m0.079s
user    0m0.052s
sys 0m0.024s

My path is as follows. As far as I can see, there is only one time executable in the path.

thomas@tbdesktop:~$ echo $PATH
thomas@tbdesktop:~$ find / -name time 2> /dev/null
share|improve this question
up vote 4 down vote accepted

Because time and /usr/bin/time run different code. In order to determine it, do the following:

type time

It will show you that:

time is a shell keyword

Thus, it doesn't run /usr/bin/time if you simply call time.

They are different things...

share|improve this answer
Great answer - thanks :) – Thomas Bratt Oct 2 '12 at 14:16

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.