Time command


To measure the execution time of a command:

time sleep 0.5
sleep 0.5  0.00s user 0.00s system 0% cpu 0.507 total

To measure the execution time of multiple commands:

time (sleep 0.5 && sleep 0.5)
( sleep 0.5 && sleep 0.5; )  0.00s user 0.00s system 0% cpu 1.013 total

To measure the execution time of a script:

time ./script.sh # echo 'sleep 60' > file.sh && chmod +x file.sh
./script.sh  0.00s user 0.00s system 0% cpu 1:01.00 total


Please support this site and join our Discord!