Name
time
Synopsis
time [option
]command
[arguments
]
Execute a command with optional arguments and print the total elapsed time, execution time, process execution time, and system time of the process (all in seconds). Times are printed on standard error. time is a built-in command in all of the Bash, Korn, and C shells. This entry describes the external command that lives in the filesystem.
Common Option
-p
,--portability
Print the real, user, and system times with a single space separating the title and the value, instead of a tab. (Mac OS X uses a tab.)
GNU/Linux Options
-a
,--append
Used with
-o
to append the output to file instead of overwriting it.-f
format
,--format=
format
Specify the output format. Overrides any format specified in the TIME environment variable.
-o
file
,--output=
file
Send the output from time to the specified file instead of to standard error. If file exists, it is overwritten.
-v
,--verbose
Give verbose output, providing all available information.
-V
,--version
Print version information and exit.
Mac OS X Option
-
-l
Print the contents of the process’s
struct rusage
structure. See getrusage(2).
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.