Bash Measure Script Execution Time
Posted:
Saturday, February 23rd, 2013Last modified:
Friday, March 27th, 2015Measuring Script Execution Times in Bash
If you want to time how long it takes to run a given script in the command line, use the time command.
time sleep 4
Outputs:
real 0m4.005s user 0m0.001s sys 0m0.002s
Place piped or chained command strings in backticks.
time `sleep 3 && sleep 3`
Outputs:
real 0m6.010s user 0m0.001s sys 0m0.005s
Available Wiki Topics
The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.