Tag Info

New answers tagged


You could write a function that does both: set_both_clocks() { date "$@" hwclock -w } Give it the exact same arguments you'd give to date when setting the system clock.


Using rdate tool as suggested in manatwork's answer, but with SNTP protocol -n and IPv4 -4 options on: # just print synced time, not set rdate -n -4 -p time-a.nist.gov # print and set synced time sudo rdate -n -4 time-a.nist.gov The tool may be installed on Debian this way: sudo apt-get install rdate


I would avoid any arithmetic operation, and use --gauge as documented ("new percentages are read from standard input"): for ((i=0;i<=100;i+=10)); do echo $i; sleep 1; done | dialog --gauge "Please wait 10 seconds." 0 0

Top 50 recent answers are included