timedisplay CPU and elapsed times for commands |
KornShell Built-in |
time [-p] command-line
time runs the command given as its argument and produces a
breakdown of total time to execute, total time spent in the user program, and
total time spent in system CPU overhead.
Times given are statistical, based on where execution is at a clock tick.
-pguarantees that the historical format of the time
command is output.
PATHdetermines the search path that time uses to locate
the command specified in command-line.
time successfully invokes command-line, it returns
the exit status of command-line; otherwise possible exit status values are:
0Successful completion.
1An error occurred in the time utility.
2Failure due to an invalid command line option.
126time found command but was unable to invoke
it.
127time was unable to find command.
sh