Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

time command in Linux with examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like 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
Last Updated : 13 Aug, 2021
Like Article
Save Article
Similar Reads