Questions tagged [time-command]

command to run programs and summarize their resources usage, be it CPU time/usage, memory/swap use, IO, pagefaults, etc.

Filter by
Sorted by
Tagged with
14
votes
2answers
894 views

Why does the output format of time vary depending on how I call it

It may be a newbie's question, but I don't understand how this is configured and why the output format of time command is different in these two cases: if used via time, the output is three rows with ...
1
vote
4answers
2k views

BASH: write the output of a command to a file

I run a program multible time using a bash script, and I want it's output to be written in a file. However, I couldn't make the operator ">filename.txt" work... Here is my script: for i in {1.....
2
votes
2answers
3k views

How to use time command in bash, to sum sys + user time, and output it as milliseconds?

The time command returns a table like this? real 0m1.607s user 0m0.154s sys 0m0.032s I am running this inside a shell script. What's the simplest way to process time output so that I get a ...
76
votes
3answers
28k views

Why doesn't the `time` command work with any option?

I tried to use time command with -f option to format the output of time, but I get the following error: -f: command not found Then I tried to use other options -a, -o, etc and I get the same error. ...
11
votes
1answer
12k views

No such file or directory when executing /usr/bin/time

I'm building my own android rom. In order to build it, I need to run mka -j8 bacon However, I wanted to measure the time it took to build it, so I used /usr/bin/time -f "User\t%U\nSys\t%S\nReal\t%...
14
votes
1answer
3k views

How can I automatically time commands in bash?

In tcsh, there's the variable time: The time shell variable can be set to execute the time builtin command after the completion of any process that takes more than a given number of CPU ...
4
votes
1answer
2k views

Why does running `time` and `/usr/bin/time` give different results?

Why does running time and /usr/bin/time give different results? /usr/bin/time thomas@tbdesktop:~$ /usr/bin/time -f "Elapsed time:%E" wc /etc/hosts 9 25 224 /etc/hosts Elapsed time:0:00.04 time ...
15
votes
2answers
5k views

Command not found when trying to set a format for the time command

I am trying to get the time it takes to run a command, with the output in a specific format: time -f "%E" ls -l This is similar to the example in the man page (and on the online man page). However ...
4
votes
2answers
3k views

Print terminal output in gedit automatically?

the command time ./myprog displays the time it took to run myprog on the screen. Now i would like to write this information to a text file. How?