time(1)
๐ time(1) โ like, the manual page but make it make sense ๐
okay bestie, gather round, because we're talking about time(1) from the General Commands Manual and honestly? she's iconic. she's the girl who tells you how long your little command took to do its thing. no cap.
โจ NAME โจ
time โ time a simple command or give resource usage
๐ธ SYNOPSIS ๐ธ
time [option ...] command [argument ...]
๐ฆ DESCRIPTION ๐ฆ
So here's the tea: time runs the program you named as command, with all those arguments you handed her. And the moment command finishes, she writes a little message to standard error with the timing stats for that run. Obsessed.
Those stats are literally three things:
- the elapsed real time between invocation and termination (like, wall-clock, the vibe of how long you sat there),
- the user CPU time โ which is the sum of the
tms_utimeandtms_cutimevalues in astruct tmsas returned bytimes(2)โจ - the system CPU time โ the sum of the
tms_stimeandtms_cstimevalues in astruct tmsas returned bytimes(2)๐
heads up bestie: some shells (looking at you,bash(1)) have a built-intimecommand that gives similar info about usage oftimeand possibly other resources too. so if you wanna reach the real command, you might need to specify its pathname, something like/usr/bin/time. don't get tricked by the impostor ๐ซถ
๐ OPTIONS ๐
-pโ when you're in the POSIX locale, use the precise traditional format:
"real %f\nuser %f\nsys %f\n"
(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. like, at least one decimal, she said what she said.
๐ EXIT STATUS ๐
- If command was invoked, the exit status is that of command. simple, she's a mirror.
- Otherwise it's 127 if command could not be found,
- 126 if it could be found but could not be invoked,
- and some other nonzero value (1โ125) if something else went wrong. ๐ญ
๐ ENVIRONMENT ๐
The variables LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, LC_NUMERIC, and NLSPATH are used for the text and formatting of the output. And PATH is used to search for command. yep, she's reading your env like a group chat screenshot.
๐ GNU VERSION ๐
Below is a description of the GNU 1.7 version of time. And get this โ disregarding the name of the utility, GNU makes it output lots of useful info, not only about time used, but also about other resources like memory, I/O and IPC calls (where available). she's doing the most and we love her for it. ๐
The output is formatted using a format string that can be specified using the -f option or the TIME environment variable.
The default format string is:
%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
When the -p option is given, the (portable) output format is used:
real %e
user %U
sys %S
๐ซ The format string ๐ซ
The format is interpreted in the usual printf(3)-like way. Ordinary characters are directly copied โ tab, newline, and backslash are escaped using \t, \n, and \\, a percent sign is represented by %%, and otherwise % indicates a conversion. And note: the program time will always add a trailing newline itself. periodt.
The conversions follow. All of those used by tcsh(1) are supported. ๐ฉท
โฐ Time
%Eโ Elapsed real time (in[hours:]minutes:seconds).%eโ (Not intcsh(1).) Elapsed real time (in seconds).%Sโ Total number of CPU-seconds that the process spent in kernel mode.%Uโ Total number of CPU-seconds that the process spent in user mode.%Pโ Percentage of the CPU that this job got, computed as(%U + %S) / %E.
๐ง Memory
%Mโ Maximum resident set size of the process during its lifetime, in Kbytes.%tโ (Not intcsh(1).) Average resident set size of the process, in Kbytes.%Kโ Average total (data+stack+text) memory use of the process, in Kbytes.%Dโ Average size of the process's unshared data area, in Kbytes.%pโ (Not intcsh(1).) Average size of the process's unshared stack space, in Kbytes.%Xโ Average size of the process's shared text space, in Kbytes.%Zโ (Not intcsh(1).) System's page size, in bytes. This is a per-system constant, but varies between systems. so, iykyk.%Fโ Number of major page faults that occurred while the process was running. These are faults where the page has to be read in from disk.%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 in the page is still valid but the system tables must be updated.%Wโ Number of times the process was swapped out of main memory.%cโ Number of times the process was context-switched involuntarily (because the time slice expired).%wโ Number of waits: times that the program was context-switched voluntarily, for instance while waiting for an I/O operation to complete.
๐ฅ I/O
%Iโ Number of filesystem inputs by the process.%Oโ Number of filesystem outputs by the process.%rโ Number of socket messages received by the process.%sโ Number of socket messages sent by the process.%kโ Number of signals delivered to the process.%Cโ (Not intcsh(1).) Name and command-line arguments of the command being timed.%xโ (Not intcsh(1).) Exit status of the command.
๐ GNU options ๐
-fformat,--format=format โ Specify output format, possibly overriding the format specified in the environment variableTIME.-p,--portabilityโ Use the portable output format.-ofile,--output=file โ Do not send the results to stderr, but overwrite the specified file.-a,--appendโ (Used together with-o.) Do not overwrite but append. she's adding to the pile, not replacing it ๐-v,--verboseโ Give very verbose output about all the program knows about. she's spilling everything.-q,--quietโ Don't report abnormal program termination (where command is terminated by a signal) or nonzero exit status. shhh ๐คซ
โญ GNU standard options โญ
--helpโ Print a usage message on standard output and exit successfully.-V,--versionโ Print version information on standard output, then exit successfully.--โ Terminate option list. that's it, options are done, we're in argument territory now.
๐ BUGS ๐
Not all resources are measured by all versions of UNIX, so some of the values might be reported as zero. The present selection was mostly inspired by the data provided by 4.2 or 4.3BSD. ๐ญ
GNU time version 1.7 is not yet localized. Thus, it does not implement the POSIX requirements. bestie is monolingual, so sorry.
The environment variable TIME was badly chosen. It is not unusual for systems like autoconf(1) or 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. like, whose idea was that. ๐
It seems unfortunate that -o overwrites instead of appends. (That is, the -a option should be the default.) we said what we said!
Mail suggestions and bug reports for GNU time to bug-time@gnu.org. Please include the version of time, which you can get by running
time --version
and the operating system and C compiler you used. thank youuu ๐ซถ
๐ธ SEE ALSO ๐ธ
bash(1), tcsh(1), times(2), wait3(2)
and that's the whole vibe check, bestie โจ this page came to you courtesy of Linux man-pages 6.20, dated 2026-02-08, for time(1). go time something and slay ๐ ๐๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-1.0-or-later
- Copyright 2000, Andries E. Brouwer <aeb@cwi.nl>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms