ntpdate equivalent command when running NTP service

If your Linux clock is more than a minute or two off, you might be tempted to use the “ntpdate” program to update the clock one time. However, the ntpdate program cannot run while the ntp daemon is running (not to mention the fact the ntpdate function is set to be retired).

You can mimic the functionality of the ntpdate command by issuing the “ntpd -q -g” command. This updates the clock, telling the ntp daemon to ignore the ‘sanity limit’ of 1000 seconds, and exit after updating the clock.