Sponsored Content
Full Discussion: output of the time command ?
Top Forums UNIX for Advanced & Expert Users output of the time command ? Post 98053 by RTM on Sunday 5th of February 2006 09:49:05 AM
Old 02-05-2006
Looks like you are using csh. It has a built-in time command. If you want to use the normal 'time' command, use /usr/bin/time versus time. See the man page for csh for the explaination of the last fields (and the fact they aren't even calculated)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

2. UNIX for Dummies Questions & Answers

Differences between time command and usr/bin/time

I wondered if someone could point out the differences between the time commmand and usr/bin/time and the accuracy one might have over another. Also, is there a website or two a person could maybe link for me to describe the differences? Thank you for your time. (2 Replies)
Discussion started by: icedrake
2 Replies

3. UNIX for Dummies Questions & Answers

how to avoid time command output

Hi, I have 2 queries 1 .when I run some unix command, I am getting the output of "time" at std output (screen) for eg zegrep <pattern> *.v.gz I almost found the reason but not sure, if the no of files matching *.v.gz is more then I am getting the time command output at the... (5 Replies)
Discussion started by: selvaka
5 Replies

4. Shell Programming and Scripting

Storing output of "time" command to a variable

Hi all, I am new to Linux/shell scripting having moderate knowledge. In my script, I need to get execution time of a command (say 'ls') in mili seconds level. For this i tried using "time" command to retrieve the total execution time in milli seconds. But, the problem is that, how to save... (9 Replies)
Discussion started by: happening_linux
9 Replies

5. Shell Programming and Scripting

redirect time command output to file (cygwin bash)

I have set up a bash script to run a long list of things that I need to time. I would like to redirect the output of time to a file. I have set it up like, echo "Runtimes for servlet 4, 100K structures" > test_times.txt echo "" >> test_times.txt echo "runs where N=10" >> test_times.txt echo... (7 Replies)
Discussion started by: LMHmedchem
7 Replies

6. Solaris

Find command output gives one day before time stamp

Hi All, I am listing the files which are 4 hours older. For this first I have creted a dummy file with the 4 hours before timestamp, then I am using the below find command, find /path/ -type f ! -newer 4_hours_oledr_file -exec ls -lrt {} \; I am getting the files which are older than... (13 Replies)
Discussion started by: velava
13 Replies

7. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

8. Shell Programming and Scripting

Time field showing Zero in ps command output

F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME COMD 401 S catmgr 5748 5742 0 154 20 e0000006d48cd080 133 e0000003fb6e7200 11:22:32 ? 0:00 /opt/ssh/libexec/sftp-server 3401 R catmgr 5742 5631 0 152 20 e0000005f974fa00 750 ... (4 Replies)
Discussion started by: TomG
4 Replies

9. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

10. Shell Programming and Scripting

Send output of time command to file

I am measuring the time it takes for a wget command to complete. Right now my command is: time wget https://`ifconfig -a | grep '32.29.120' | cut -d: -f2 | cut -d' ' -f1`:8443/primary-rest/shop?brandId=test --header="name: test" --no-check-certificate -o SELF_TEST.log The output I get is ... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies
time(1) 							   User Commands							   time(1)

NAME
time - time a simple command SYNOPSIS
time [-p] utility [argument]... DESCRIPTION
The time utility invokes utility operand with argument, and writes a message to standard error that lists timing statistics for utility. The message includes the following information: o The elapsed (real) time between invocation of utility and its termination. o The User CPU time, equivalent to the sum of the tms_utime and tms_cutime fields returned by the times(2) function for the process in which utility is executed. o The System CPU time, equivalent to the sum of the tms_stime and tms_cstime fields returned by the times() function for the process in which utility is executed. 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) OPTIONS
The following option is supported: -p Writes the timing output to standard error in the following format: real %f user %f sys %f < real seconds>, <user seconds>, <system seconds> OPERANDS
The following operands are supported: utility The name of the utility that is to be invoked. argument Any string to be supplied as an argument when invoking utility. USAGE
The time utility returns exit status 127 if an error occurs so that applications can distinguish "failure to find a utility" from "invoked utility exited with an error indication." The value 127 was chosen because it is not commonly used for other meanings. Most utilities use small values for "normal error conditions" and the values above 128 can be confused with termination due to receipt of a signal. The value 126 was chosen in a similar manner to indicate that the utility could be found, but not invoked. EXAMPLES
Example 1 Using the time command It is frequently desirable to apply time to pipelines or lists of commands. This can be done by placing pipelines and command lists in a single file. This single file can then be invoked as a utility, and the time applies to everything in the file. Alternatively, the following command can be used to apply time to a complex command: example% time sh -c 'complex-command-line' Example 2 Using time in the csh shell The following two examples show the differences between the csh version of time and the version in /usr/bin/time. These examples assume that csh is the shell in use. example% time find / -name csh.1 -print /usr/share/man/man1/csh.1 95.0u 692.0s 1:17:52 16% 0+0k 0+0io 0pf+0w See csh(1) for an explanation of the format of time output. example% /usr/bin/time find / -name csh.1 -print /usr/share/man/man1/csh.1 real 1:23:31.5 user 1:33.2 sys 11:28.2 ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of time: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, LC_NUMERIC, NLSPATH, and PATH. EXIT STATUS
If utility is invoked, the exit status of time will be the exit status of utility. Otherwise, the time utility will exit with one of the following values: 1-125 An error occurred in the time utility. 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: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), shell_builtins(1), timex(1), times(2), attributes(5), environ(5), standards(5) NOTES
When the time command is run on a multiprocessor machine, the total of the values printed for user and sys can exceed real. This is because on a multiprocessor machine it is possible to divide the task between the various processors. When the command being timed is interrupted, the timing values displayed may not always be accurate. BUGS
Elapsed time is accurate to the second, while the CPU times are measured to the 100th second. Thus the sum of the CPU times can be up to a second larger than the elapsed time. SunOS 5.11 1 Feb 1995 time(1)
All times are GMT -4. The time now is 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy