Well, even if you don't like it, I will put you to read again with more attention man time
. At the end of EXAMPLES
section you will find:
Users of the bash shell need to use an explicit path in order to run
the external time command and not the shell builtin variant. On system
where time is installed in /usr/bin, the first example would become
/usr/bin/time wc /etc/hosts
So, I'm assuming that you use bash shell which uses an internal version of time
, provided as a shell keyword. You can check this using the following command:
type time
and the output will probably be:
time is a shell keyword
If this is the case, then it is clear that to use the real time
command you must use its explicit path: /usr/bin/time
.
Further, if you don't want to use anymore the shell keyword time
, you can create a permanent alias as follow:
alias time='/usr/bin/time'
This will overwrite the shell keyword time
because the command:
type time
will give the following output now:
time is aliased to `/usr/bin/time'
sudo apt-get install --reinstall time
help? – jobin Mar 14 '14 at 17:53time
with/usr/bin/time
– Rmano Mar 14 '14 at 17:53