Timing command line functions

Yet another basic command line tool that is awesome:

time

This lets you do a quick and dirty profile on some code you’re executing.

Basic Usage

time <command>

This will execute the command and put out a summary detailing how long the command took in total, how long it was tied up in actual execution, and how long it was tied up in system overhead:

real	0m0.031s
user	0m0.004s
sys	0m0.023s

Another nifty function that does one thing and one thing only, but does it well. Thanks Unix philosophy!

  • About

    Tom Sartain is a PHP developer, photographer, and overall information junkie. As a diploma-bearing philosopher, he does what 99% of all philosophy majors do after graduation: something else.