I used the following linux command to display the time date +%T
. It displays the current time.
If I want to display the time every one minute which Linux command should I use?
Expected Result:
15:44:26
15:45:26
15:46:26
There is no specific unix command for this, but this be handled by a bit of shell script.
With bash
(the standard shell provided with most Linux distro):
while [ 1 ]; do date "+%T"; sleep 60; done
while [ 1 ]; do echo -en \
date "+%T"`"\r"; sleep 60; done`
– Tigger
Nov 01 '16 at 05:52
tm() { date +%T; sleep 1; tm; };tm
– Severus Tux Oct 18 '16 at 11:06