*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> time (1)              
Title
Content
Arch
Section
 

time(1)

Contents


NAME    [Toc]    [Back]

       time - Times the execution of a command

SYNOPSIS    [Toc]    [Back]

       time [-p] command [argument...]

       The time command prints the elapsed time during the execution
 of a command, the time spent in the system,  and  the
       time  spent  in execution of the command on the diagnostic
       output system.

                                  Note

       The C shell has a built-in version of  the  time  command.
       If  you  are using the C shell, and want to guarantee that
       you are using the command described here, you must specify
       the  full  path  /usr/bin/time.   See the csh(1) reference
       page for a description of the built-in command.

STANDARDS    [Toc]    [Back]

       Interfaces documented on this reference  page  conform  to
       industry standards as follows:

       time:  XCU5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

OPTIONS    [Toc]    [Back]

       Writes the timing output to standard error.  This  is  the
       default.

OPERANDS    [Toc]    [Back]

       The  name of a command to be executed.  If command identifies
 any name specified as a special built in your  applicable
  shell reference page, the results are undefined and
       unpredictable.  The argument to be passed to command.  See
       the  appropriate  reference  pages for these values.  This
       parameter may include flags and arguments expected by command.

DESCRIPTION    [Toc]    [Back]

       The time command prints the elapsed time during the execution
 of a command, the time spent in the system,  and  the
       time  spent  in execution of the command on the diagnostic
       output system. Time is reported in seconds.

       The time command (with a different format) is  also  built
       into csh.

NOTES    [Toc]    [Back]

       When  time  is  used  as  part  of  a  pipeline, the times
       reported are unspecified, except when it is the sole  command
 within a grouping command in that pipeline. For example,
 the commands on the left are  unspecified;  those  on
       the right report on utilities a and c, respectively.

       time  a  |  b  |  c      { time a } | b | c a | b | time c
       a | b | (time c)


EXIT STATUS    [Toc]    [Back]

       The time command returns the following exit values if  the
       command  could  not  be  invoked: An error occurred in the
       time command.  The command specified by command was  found
       but  could  not be invoked.  The command specified by command
 could not be found.

       If the command was successfully invoked, the  exit  status
       of time is the exit status of command.

EXAMPLES    [Toc]    [Back]

       To measure the time required to run a program, enter: time
       a.out

              This runs the program a.out and writes to the standard
  error  output the amount of real, system, and
              user time that it uses: real   10.5 user   0.3  sys
              3.6  To measure the time required by a complex command,
 enter: time sh -c 'complex-cmmand-line'

              This runs all of the commands,  which  may  include
              pipelines, and returns the time information for the
              entire series of commands.

ENVIRONMENT VARIABLES    [Toc]    [Back]

       The following environment variables affect  the  execution
       of  time:  Provides a default value for the internationalization
 variables that are unset or null. If LANG is unset
       or  null,  the corresponding value from the default locale
       is used.  If any  of  the  internationalization  variables
       contain an invalid setting, the utility behaves as if none
       of the variables had been defined.  If set to a  non-empty
       string value, overrides the values of all the other internationalization
 variables.  Determines the locale for  the
       interpretation of sequences of bytes of text data as characters
 (for example, single-byte as opposed  to  multibyte
       characters  in  arguments).  Determines the locale for the
       format and contents  of  diagnostic  messages  written  to
       standard  error.  Determines the location of message catalogues
 for the processing of LC_MESSAGES.  Determines  the
       path used to locate command.

SEE ALSO    [Toc]    [Back]

      
      
       Commands:  csh(1),  ksh(1),  Bourne  shell  sh(1b),  POSIX
       shell sh(1p)

       Functions:  times(3)

       Standards:  standards(5)



                                                          time(1)
[ Back ]
 Similar pages
Name OS Title
time FreeBSD time command execution
env HP-UX set environment for command execution
time OpenBSD time command execution
rexec Tru64 Allow command execution on a remote host
crttrace IRIX arrange for command execution to be traced
rexec_r Tru64 Allow command execution on a remote host
ssh Tru64 Secure Shell client remote login and command execution application
ssh2 Tru64 Secure Shell client remote login and command execution application
Benchmark IRIX benchmark running times of code timethis - run a chunk of code several times timethese - run several chunks of
env IRIX set environment for command execution, print environment
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service