3

Is there a stopwatch, so that I can measure time taken for different commands for BASH shell?

user
  • 1,757

1 Answers1

10

time [command] returns the time taken for the command to complete.

steven@wind:~$ time du /storage -s
du: cannot read directory `/storage/lost+found': Permission denied
1548584024      /storage

real    0m4.046s
user    0m0.224s
sys     0m1.496s
steven@wind:~$ time sleep 5

real    0m5.003s
user    0m0.000s
sys     0m0.000s
steven@wind:~$
Steven K
  • 4,556