Tagged Questions
0
votes
0answers
17 views
Getting “zsh: command not found: time” when running `time` in subshell
I installed ZSH (and Oh-My-ZSH) on a Ubuntu 12.10 64 bit machine a few days ago. I just tried to do:
time (time ls)
and got this error:
zsh: command not found: time
( time ls; ) 0.00s user 0.00s ...
3
votes
1answer
147 views
Increase %e precision with /usr/bin/time shell command
When I run the time command in shell time ./myapp I get an output like the following:
real 0m0.668s
user 0m0.112s
sys 0m0.028s
However,when I run the command \time -f %e ./myapp I lose ...
2
votes
1answer
334 views
Good method to compare time?
I need to check for the current time and abort the script if it is not proper time of day I am supposed to run it. Also, if anyone else runs it, it should abort.
For example: I need my script to only ...
2
votes
1answer
271 views
Execution time of pi calculation in shell scripts
I have to run a couple of command lines on a shell script on Ubuntu,
one of those is a pi calculation.
It works fine when i run it on terminal via the following cmd line:
time echo ...
7
votes
2answers
2k views
How to run time on multiple commands AND write the time output to file?
I want to run time command to measure time of several commands.
What I want to do is:
Measure the time of running of all of them added together
Write the time output to a file
Write the STDERR from ...
20
votes
1answer
658 views
Why does echo >file use more real time than echo | sed >file?
The example, below, surprised me. It seems to be counter intuitive... aside from the fact that there is a whisker more user time for the echo | sed combo.
Why is echo using so much sys time when it ...
4
votes
3answers
1k views
Convert seconds to well format date
I want to display /proc/uptime in well format as:
DD:HH:MM:SS
/proc/uptime give me up time of system in seconds, is there a standard solution that convert seconds to this format?
