Prints the time of the execution of a command.
time [ -p ] Command [ Argument ... ]
The time command prints the elapsed time during the execution of a command, time in the system, and execution time of the time command in seconds to standard error.
Note: Sleep time is not charged to either system or user time.
The time command is also built into the C shell (csh) and Korn shell (ksh) with a different format. To run the time command while in the csh and ksh shells, enter:
|-p||Writes the timing output to standard error. Seconds are expressed as a floating-point number with at least one digit following the radix character.|
If you use the Command
parameter, the exit status of the time command is the exit status
of the specified command. Otherwise, the time command exits
with one of the following values:
|1-125||Indicates an error occurred in the time command.|
|126||Indicates the command specified by the Command parameter was found but could not be invoked.|
|127||Indicates the command specified by the Command parameter could not be found.|
/usr/bin/time -p a.out
This command runs the program a.out and writes the amount of real, user, and system time to standard error, in the format specified by the -p flag; for example:
real 10.5 user 0.3 sys 3.6
/usr/bin/time a.out 2> a.time
|/usr/bin/time||Specifies the path of the time command.|
The timex command.
Setting Up an Accounting System in AIX 5L Version 5.1 System Management Guide: Operating System and Devices.
Accounting Commands in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.
Accounting Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.
Using the time Command to Measure CPU Use in AIX 5L Version 5.1 Performance Management Guide.