Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

time(1) [freebsd man page]

TIME(1) 						    BSD General Commands Manual 						   TIME(1)

NAME
time -- time command execution SYNOPSIS
time [-al] [-h | -p] [-o file] utility [argument ...] DESCRIPTION
The time utility executes and times the specified utility. After the utility finishes, time writes to the standard error stream, (in sec- onds): the total time elapsed, the time used to execute the utility process and the time consumed by system overhead. The following options are available: -a If the -o flag is used, append to the specified file rather than overwriting it. Otherwise, this option has no effect. -h Print times in a human friendly format. Times are printed in minutes, hours, etc. as appropriate. -l The contents of the rusage structure are printed as well. -o file Write the output to file instead of stderr. If file exists and the -a flag is not specified, the file will be overwritten. -p Makes time output POSIX.2 compliant (each time is printed on its own line). Some shells may provide a builtin time command which is similar or identical to this utility. Consult the builtin(1) manual page. If time receives a SIGINFO (see the status argument for stty(1)) signal, the current time the given command is running will be written to the standard output. ENVIRONMENT
The PATH environment variable is used to locate the requested utility if the name contains no '/' characters. EXIT STATUS
If utility could be timed successfully, its exit status is returned. If utility terminated abnormally, a warning message is output to stderr. If the utility was found but could not be run, the exit status is 126. If no utility could be found at all, the exit status is 127. If time encounters any other error, the exit status is between 1 and 125 included. SEE ALSO
builtin(1), csh(1), getrusage(2), wait(2) STANDARDS
The time utility is expected to conform to ISO/IEC 9945-2:1993 (``POSIX''). HISTORY
A time utility appeared in Version 3 AT&T UNIX. BSD
May 14, 2006 BSD

Check Out this Related Man Page

env(1)								   User Commands							    env(1)

NAME
env - set environment for command invocation SYNOPSIS
/usr/bin/env [-i | -] [name=value]... [utility [arg... ]] /usr/xpg4/bin/env [-i | -] [name=value]... [utility [arg... ]] DESCRIPTION
The env utility obtains the current environment, modifies it according to its arguments, then invokes the utility named by the utility op- erand with the modified environment. Optional arguments are passed to utility. If no utility operand is specified, the resulting environment is written to the standard output, with one name=value pair per line. /usr/bin If env executes commands with arguments, it uses the default shell /usr/bin/sh (see sh(1)). /usr/xpg4/bin If env executes commands with arguments, it uses /usr/xpg4/bin/sh (see ksh(1)). OPTIONS
The following options are supported: -i | - Ignores the environment that would otherwise be inherited from the current shell. Restricts the environment for utility to that specified by the arguments. OPERANDS
The following operands are supported: name=value Arguments of the form name=value modify the execution environment, and are placed into the inherited environment before utility is invoked. utility The name of the utility to be invoked. If utility names any of the special shell built-in utilities, the results are unde- fined. arg A string to pass as an argument for the invoked utility. EXAMPLES
Example 1 Invoking utilities with new PATH values The following utility: example% env -i PATH=/mybin mygrep xyz myfile invokes the utility mygrep with a new PATH value as the only entry in its environment. In this case, PATH is used to locate mygrep, which then must reside in /mybin. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of env: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. PATH Determine the location of the utility. If PATH is specified as a name=value operand to env, the value given shall be used in the search for utility. EXIT STATUS
If utility is invoked, the exit status of env is the exit status of utility. Otherwise, the env utility returns one of the following exit values: 0 Successful completion. 1-125 An error occurred. 126 utility was found but could not be invoked. 127 utility could not be found. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: /usr/bin +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |enabled | +-----------------------------+-----------------------------+ /usr/xpg4/bin +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxcu4 | +-----------------------------+-----------------------------+ |CSI |enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
ksh(1), sh(1), exec(2), profile(4), attributes(5), environ(5), standards(5) SunOS 5.11 2 Jan 2002 env(1)
Man Page