Linux command 'watch'

Matthias Apitz guru at
Tue May 26 14:42:22 UTC 2020


On my Ubuntu mobile phone I'm used to use a command 'watch' in its
terminal app in this way, for example:

$ watch -n 1 date

This does every second: clears the screen, launches date and prints its
STDOUT into the terminal. Due to the clear of the screen, the output of
date stays in the same position and only the part of the seconds is counting
upwards. I got to know and to use it, because the Ubuntu phone lacks a
digital clock app showing the seconds.

The FreeBSD watch(1) command does other things, nothing todo with the above.

Do we have something similar? Ofc I could write this as a shell loop, so
please don't give me such hints :-)


Matthias Apitz, ✉ guru at, +49-176-38902045
Public GnuPG key:
May, 9: Спаси́бо освободители! Thank you very much, Russian liberators!

More information about the freebsd-questions mailing list