times — Get process and child process times

Format

times [–p]

Description

times displays user and system times accumulated by the shell and commands run as children of the shell. Times are displayed in minutes and seconds. User time is CPU time spent in user programs. System time is CPU time spent in the operating system on behalf of the user process.

Options

–p
Formats the output in seconds without units. For example, 1 minute and 3.7 seconds is displayed as:
63.47
Times are displayed in minutes and seconds. User time is processor time spent in user programs. System time is processor time spent in the operating system on behalf of the user process. The output layout is:
shell user time         shell system time
child user time         child system time

Usage notes

times is a built-in shell command.

Localization

times uses the following localization environment variables:
  • LANG
  • LC_ALL
  • LC_MESSAGES
  • NLSPATH

See Localization for more information.

Exit values

0
Successful completion
2
Failure that resulted in a usage message, usually due to an incorrect command-line option

Portability

X/Open Portability GuideX/Open Portability Guide.

The –p option is an extension to the XPG standard.

Related information

sh, time