BASH – Display Clock within Shell

The following command will place a clock within the top right corner of your shell.

 
while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-25));date;tput rc;done &

Rick Donato

Want to become a Linux expert?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial