Modular Computers the manual GitHub

time

time: time a command.

Synopsis

time command [arg…]

Description

time runs command with its arguments, waits for it, and then writes how long it took to standard error, after a blank line:

real    0m1.250s

command is found as the shell finds it: a name with a / is a path, else the first match in PATH. It runs with time’s standard input, output and error.

Exit status

The command’s exit status; 128 + n if a signal n ended it; 127 if it isn’t found; 126 if it can’t be started; 2 (with a usage message) when no command is given.

Notes

Only the real (elapsed) time is reported, from the computer’s uptime: the kernel doesn’t count user or system time. There are no options. It is a program, not a shell keyword, so it times one command, not a pipeline.

See also

sh(1), uptime(1), sleep(1)