NAME
time — time a command
SYNOPSIS
time
command
time
[-p]
utility
[argument ...]
DESCRIPTION
When a specified
command
or
utility
completes execution,
time
prints the elapsed time during the command or utility,
the time spent in the system,
and the time spent executing the command or utility.
Times are reported in seconds.
Execution time can depend on the performance of the memory
in which the program is running.
The times are printed to standard error.
Note that the shell also has a keyword
time
that times an entire pipeline if used anywhere in the pipeline.
This action is different than the
time
command which times a particular command if used in a pipeline.
Options
time
recognizes the following options:
- command
The command to be executed and timed.
- -p
Writes the timing statistics to standard error.
- utility
The name of a utility to be invoked and timed.
If the utility operand names any of the shell special built-in utilities,
the time results are undefined.
See
csh(1)
and
ksh(1)
for information about special built-in utilities.
- argument
Any string that is an argument to the
utility.
STANDARDS CONFORMANCE
time: SVID2, XPG2, XPG3, XPG4, POSIX.2