The Wayback Machine - https://web.archive.org/web/20240204104615/https://www.geeksforgeeks.org/time-command-in-linux-with-examples/
Open In App
Related Articles

time command in Linux with examples

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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. 
     

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about!


Last Updated : 13 Aug, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads