Keeping Time on Linux using ntpdate and hwclock

On December 23, 2009, in How-to, by Cubert aka (Cube Dweller)

If you want a quick way to keep your linux system up to current time then just pop in our little script and your stay on time.

You can also use the following script to run every hour from your cronjob or create a file and copy the following to it. Place file in /etc/cron.hourly
#Quick script to update time and push time to hardware clock
#Created by Cubert for
/usr/sbin/ntpdate -s
/sbin/hwclock --adjust
/sbin/hwclock --systohc

Tagged with:

Leave a Reply