time

From Initq

Jump to: navigation, search

To use the command, simply precede any command by the word time, such as:

 [alibaba@ohnonono ~]$ time /usr/games/fortune | mail -s "hello qais" qais@initq.com
 real    0m0.017s
 user    0m0.001s
 sys     0m0.004s

When the command completes, time will report how long it took to execute the ls command in terms of user CPU time, system CPU time, and real time. The output format varies between different versions of the command, and some give additional statistics, as in this example:

 [alibaba@ohnonono ~]$ time host wikipedia.org
 wikipedia.org has address 208.80.152.2
 wikipedia.org mail is handled by 10 mchenry.wikimedia.org.
 wikipedia.org mail is handled by 50 lists.wikimedia.org.
 real    0m0.137s
 user    0m0.007s
 sys     0m0.004s
Personal tools