Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 172010
 

How to measure the time needed to execute a command

Answer:

Use the time command, e.g.

# time perl -e 'sleep 5'

real    0m5.026s
user    0m0.010s
sys     0m0.020s

The above perl command takes around 5 seconds to execute.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>