time(1)time(1)Nametime - time a command
Syntaxtime command
/bin/time command
Description
The command lets the specified command execute and then outputs the
amount of elapsed real time, the time spent in the operating system,
and the time spent in execution of the command. Times are reported in
seconds and are written to standard error.
If you are using any shell except the C shell, you can give the command
as shown on the first line of the Syntax section. If you are using the
C shell, you must use the command's full pathname as shown on the sec‐
ond line of the Syntax section. If you do not use the full pathname,
will execute its own built-in command that supplies additional informa‐
tion and uses a different output format.
The command can be used to cause a command to be timed no matter how
much CPU time it takes. For example:
% /bin/time cp /etc/rc /usr/bill/rc
0.1 real 0.0 user 0.0 sys
% /bin/time nroff sample1 > sample1.nroff
3.6 real 2.4 user 1.2 sys
This example indicates that the command used negligible amounts of user
and system time and had an elapsed time of 1/10 second (0.1). The com‐
mand used 2.4 seconds of user time and 1.2 seconds of system time, and
required 3.6 seconds of elapsed time.
Restrictions
Times are measured to an accuracy of 1/10 second. Thus, the sum of the
user and system times can be larger than the elapsed time.
See Alsocsh(1)time(1)