Time (benchmark) your commands

Perhaps unexpected, the time command, doesn’t actually give you the system time (use date for that). What it is does is “time” how long something takes to run (so a different use of the word time).

So for example, let’s say you are doing a mysql import, you can prepend it with time to find how long it took to run:

$ time mysql -u user -p db < import_file.sql

real 1m0.377s
user 0m0.637s
sys 0m0.126s

A quick and useful benchmark, even if it only lets you know how long you have to go make a coffee 🙂