.\" Some fragments of text came from the time-1.7 info file.
.\" Inspired by kromJx@crosswinds.net.
.\"
-.TH TIME 1 2000-12-11 "" ""
+.TH TIME 1 2008-11-14 "" "Linux User's Manual"
.SH NAME
time \- time a simple command or give resource usage
.SH SYNOPSIS
.I "struct tms"
as returned by
.BR times (2)).
-.SH OPTION
+
+Note: some shells (e.g.,
+.BR bash (1))
+have a built-in
+.B time
+command that provides less functionality than the command described here.
+To access the real command, you may need to specify its pathname
+(something like
+.IR /usr/bin/time ).
+.SH OPTIONS
.TP
.B \-p
When in the POSIX locale, use the precise traditional format
-.br
-.in +5
+.IP
+.in +4n
"real %f\enuser %f\ensys %f\en"
-.in -5
-.br
+.in
+.IP
(with numbers in seconds)
where the number of decimals in the output for %f is unspecified
but is sufficient to express the clock tick accuracy, and at least one.
could not be found, 126 if it could be found but could not be invoked,
and some other non-zero value (1-125) if something else went wrong.
.SH ENVIRONMENT
-The variables LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, LC_NUMERIC,
-NLSPATH and PATH are used.
+The variables
+.BR LANG ,
+.BR LC_ALL ,
+.BR LC_CTYPE ,
+.BR LC_MESSAGES ,
+.BR LC_NUMERIC ,
+.BR NLSPATH ,
+and
+.B PATH
+are used.
The last one to search for
.IR command .
The remaining ones for the text and formatting of the output.
useful information, not only about time used, but also on other
resources like memory, I/O and IPC calls (where available).
The output is formatted using a format string that can be specified
-using the \-f option or the TIME environment variable.
+using the
+.I \-f
+option or the
+.B TIME
+environment variable.
.LP
-The default format string is
-.br
-.in +3
+The default format string is:
+.PP
+.in +4n
%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
.br
%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
.br
-.in -3
+.in
.LP
-When the \-p option is given the (portable) output format
-.br
-.in +3
+When the
+.I \-p
+option is given the (portable) output format
+.PP
+.in +4n
real %e
.br
user %U
.br
sys %S
.br
-.in -3
+.in
+.PP
is used.
.SS "The format string"
The format is interpreted in the usual printf-like way.
.B %R
Number of minor, or recoverable, page faults.
These are faults for pages that are not valid but which have
-not yet been claimed by other virtual pages. Thus the data
+not yet been claimed by other virtual pages.
+Thus the data
in the page is still valid but the system tables must be updated.
.TP
.B %W
Number of signals delivered to the process.
.TP
.B %C
-(Not in tcsh.) Name and command line arguments of the command being timed.
+(Not in tcsh.) Name and command-line arguments of the command being timed.
.TP
.B %x
(Not in tcsh.) Exit status of the command.
-.SH "GNU OPTIONS"
+.SS "GNU Options"
.TP
.BI "\-f " FORMAT ", \-\-format=" FORMAT
Specify output format, possibly overriding the format specified
Use the portable output format.
.TP
.BI "\-o " FILE ", \-\-output=" FILE
-Do not send the results to stderr, but overwrite the specified file.
+Do not send the results to \fIstderr\fP, but overwrite the specified file.
.TP
.B "\-a, \-\-append"
(Used together with \-o.) Do not overwrite but append.
.TP
.B "\-v, \-\-verbose"
Give very verbose output about all the program knows about.
-.SH "GNU STANDARD OPTIONS"
+.SS "GNU Standard Options"
.TP
.B "\-\-help"
Print a usage message on standard output and exit successfully.
GNU time version 1.7 is not yet localized.
Thus, it does not implement the POSIX requirements.
.LP
-The environment variable TIME was badly chosen.
-It is not unusual for systems like autoconf or make
+The environment variable
+.B TIME
+was badly chosen.
+It is not unusual for systems like
+.BR autoconf (1)
+or
+.BR make (1)
to use environment variables with the name of a utility to override
the utility to be used.
Uses like MORE or TIME for options to programs
(instead of program pathnames) tend to lead to difficulties.
.LP
-It seems unfortunate that \-o overwrites instead of appends.
-(That is, the \-a option should be the default.)
+It seems unfortunate that
+.I \-o
+overwrites instead of appends.
+(That is, the
+.I \-a
+option should be the default.)
.LP
Mail suggestions and bug reports for GNU
.B time