Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

(The linux equivalent of TimeThis.exe)

Something like:

timethis wget

wget took 3 seconds.
share|improve this question

2 Answers 2

up vote 20 down vote accepted

Try just time instead of timethis.

Although be aware that there's often a shell builtin version of time and a binary version, which will give results in different formats:

$ time wget -q -O /dev/null

real    0m0.178s
user    0m0.003s
sys     0m0.005s


$ \time wget -q -O /dev/null
0.00user 0.00system 0:00.17elapsed 4%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+613minor)pagefaults 0swaps

Unlike your "timethis" program, you get three values back. That's broken down in What is "system time" when using "time" in command line, but in short: real means "wall-clock time", while user and sys show CPU clock time, split between regular code and system calls.

share|improve this answer

By using the executable time instead of the shell builtin, you can specify the output format and values. E.g. get the real elapsed time together with the command name and parameters

/usr/bin/time --format='%C took %e seconds' sleep 3
sleep 3 took 3.00 seconds

Note that you must specify the path for time, else you will default to using the shell built-in.

share|improve this answer
notice that: the path is important. Don't just use 'time' in bash. Instead, use /usr/bin/time – CodeFarmer Aug 31 '14 at 5:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.