Skip to content
Related Articles
Open in App
Not now

Related Articles

time command in Linux with examples

Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 13 Aug, 2021
Improve Article
Save Article

time command in Linux is used to execute a command and prints a summary of real-time, user CPU time and system CPU time spent by executing a command when it terminates. ‘real‘ time is the time elapsed wall clock time taken by a command to get executed, while ‘user‘ and ‘sys‘ time are the number of CPU seconds that command uses in user and kernel mode respectively. 

Syntax: 

time [option] [COMMAND]

Example: 
 

In the above example, sleep 3 is used to create a dummy job which lasts 3 seconds. 

Options: 

  • time -p : This option is used to print time in POSIX format. 

     

  • help time : it displays help information. 
     

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!