Skip to content
Advertisement

time option doesn’t work

I tried to measure execution time and format it with this command:

JavaScript

But such command works:

JavaScript

I tried to determine where another time is located, but all showes to /usr/bin/time

JavaScript

or

JavaScript

or

JavaScript

How to define where another time is located?

Advertisement

Answer

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

JavaScript

OR

Note: some shells (e.g., bash(1)) have a built-in time command that provides less functionality than the command described here. To access the real command, you may need to specify its pathname (something like /usr/bin/time).

http://man7.org/linux/man-pages/man1/time.1.html

Advertisement