Home Download Ubuntu

Terminal clock in Ubuntu

Live clock:

watch -n 1 echo ""


or

while true; do date; echo -ne "\033[1F"; sleep 1; done


or make an executable

make a file

sudo nano /etc/init.d/liveclock


enter this:

#!/bin/bash
# clock - A bash clock that can run in your terminal window.
while true;do clear;date +"%r";sleep 1;done


make it executable:

sudo chmod +x /etc/init.d/liveclock

0 comments:

Post a Comment