3

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
gps sago
  • 111
  • 1
  • 1
  • 6

1 Answers1

1

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
Ouki
  • 5,842
  • 4
  • 23
  • 31
  • 1
    With a small tweak you can remove the scrolling with `while [ 1 ]; do echo -en \`date "+%T"\`"\r"; sleep 60; done` – Tigger Nov 01 '16 at 05:52