time

Measure the running time of a command.

Syntax
      time [-lp] [command]

Options

   -l      The contents of the rusage structure are printed.
   -p      The output is formatted as specified by IEEE Std 1003.2-1992 (POSIX.2)

The time utility executes and times command. After the utility finishes, time writes the total time elapsed, the time consumed by system overhead, and the time used to execute command to the standard error stream. Times are reported in seconds.

Without command, prints a time summary for the current shell and its children.

The time utility shall exit with one of the following values:
1-125 An error occurred in the time utility.
126 The utility was found but could not be invoked.
127 The utility could not be found.
Otherwise, the exit status of time shall be that of command.

“Let us not look back in anger or forward in fear, but around us in awareness” ~ James Thurber

Related:

time man page - Apple.com
exec - Execute a command


© Copyright SS64.com 1999-2014
Some rights reserved