time
ShellFundamentals In simulator In real LinuxTime how long a command takes
Name: time
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
time runs a command and reports how long it took: real is elapsed time, user and sys are CPU time in user and kernel mode. bash has a time keyword and there is also a more detailed /usr/bin/time.
Syntax
time COMMANDCommon options
| real | Wall-clock time |
| user / sys | CPU time in user / kernel mode |
| -p | POSIX output: plain seconds, easy to read in scripts |
Examples
$ time sort big.txt > /dev/null
See how long a sort takes
Explain