Timing Program Execution

Learn how to check the execution time of a process.

Sometimes, it’s helpful to know how long a process takes. Maybe we see how long it takes to build a program from the source, or maybe we’re comparing program execution on different machines. The time command tracks how long a process takes to complete.

Using the time command

To use it, we prefix our command with time. Let’s execute this command to search for all of the files on the hard drive that changed in the last 30 minutes and calculate how long it takes:

time find / -mmin -30

Get hands-on with 1200+ tech skills courses.