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.

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.

  1. How to execute a command repeatedly using bash
  2. Execute command as another user
  3. Set the maximum execution time in PHP
  4. How to execute command in multiple lines
  5. How to execute SQL using command line

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>