Keeping Time on Linux using ntpdate and hwclock

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
#!/bin/sh
#Quick script to update time and push time to hardware clock
#Created

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
#!/bin/sh
#Quick script to update time and push time to hardware clock
#Created by Cubert for squidworks.net
/usr/sbin/ntpdate -s
/sbin/hwclock --adjust
/sbin/hwclock --systohc