time Linux Commands

What is Linux time Command?

Explanation

time COMMAND:

Time command is used to find the time taken by the system to execute a program. This command gives the information about the time taken by the system in kernel mode (real) , user mode (user) and the resource used by the system (sys).

SYNTAX :


time [options] command [arguments]

OPTIONS:


-o FILE Write the resource use statistics to FILE.
-a,--append Append the resource use information to the output file instead of overwriting it.
-p,--portability Use the POSIX format.
-V Use the built-in verbose format.

EXAMPLE:


  1. time test.php
    Output:
    real 0m0.032s user 0m0.002s sys 0m0.000s
    The above command displays the time taken to execute the program test.php.

Ask Questions

Ask Question