help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Duration between two time stamps


From: Lee
Subject: Re: Duration between two time stamps
Date: Thu, 19 Aug 2021 03:44:27 -0400

On 8/18/21, hancooper via <help-bash@gnu.org> wrote:
> How can I use two time stamps and compute the elapsed time?
> I have a search command that I want to also compute the execution time

If it's one command run from the bash prompt, why not use time?  eg:
$ time dd if=/dev/zero of=tempfile bs=1M count=100 oflag=sync
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 7.29611 s, 14.4 MB/s

real    0m7.354s
user    0m0.000s
sys     0m0.764s



reply via email to

[Prev in Thread] Current Thread [Next in Thread]