how to time a process in bash? [duplicate]
Easiest way is to use bash's integrated time
, GNU Time or another unix time
command implementation:
time ./sript.sh
If you're interested in ticks, you can approximate it with a little help from /proc/cpuinfo
.
If you want to dig deeper, have a look at strace
.
time
can achieve this. In this case:
$ time foo.sh