time
The time command runs the specified program command with the given arguments. When command finishes, time writes a message to standard error giving timing statistics about this program run. These statistics consist of (i) the elapsed real time between invocation and termination, (ii) the user CPU time, and (iii) the system CPU time.[1]
Documentation
- man 1 'time' [EN]
Syntax
time [PARAMETER ...] COMMAND
Parameters
- -f FORMAT, --format=FORMAT
- Specify output FORMAT, possibly overriding the format specified in the environment variable TIMEFORMAT.
Format
Time
- %E
- Elapsed real time (in [hours:]minutes:seconds).
- %P
- Percentage of the CPU that this job got, computed as (%U + %S) / %E.
Examples
time ls -la
Output:
total 337
drwxr-xr-x+ 1 alex alex 0 Oct 11 15:10 .
drwxr-xr-x+ 1 root root 0 Mar 4 2010 ..
...
real 0m0.125s
user 0m0.000s
sys 0m0.015s
References
- ↑ man 1 'time'