Timing the Execution Time of a Script

If you want to test the time it takes to run a script, you can use the UNIX ‘time’ command. the manual page states:

The time utility executes and times the specified utility.  After the
utility finishes, time writes to the standard error stream, (in seconds):
the total time elapsed, the time used to execute the utility process and
the time consumed by system overhead.

see this example:

# time /bin/rehash

real	0m0.007s
user	0m0.007s
sys	0m0.000s
This entry was posted in FreeBSD Administration, Perl and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *