Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

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
2 answers

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 ...
xaxa's user avatar
  • 439
1 vote
4 answers

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.....
Jim Blum's user avatar
  • 1,407
2 votes
2 answers

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 ...
a06e's user avatar
  • 13.3k
93 votes
3 answers

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. ...
user258266's user avatar
  • 1,264
11 votes
1 answer

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%...
P1nGu1n's user avatar
  • 213
17 votes
1 answer

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 ...
Eyal's user avatar
  • 1,231
4 votes
1 answer

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 ...
Thomas Bratt's user avatar
15 votes
3 answers

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 ...
Isaac's user avatar
  • 253
4 votes
2 answers

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?
user2413's user avatar
  • 14.4k