现在的位置: 首页 > 综合 > 正文

实现linux和时间服务器的时间同步

2012年04月30日 ⁄ 综合 ⁄ 共 319字 ⁄ 字号 评论关闭
#more /root/time.sh
#
!/bin/sh
/usr/bin/ntpdate  asia.pool.ntp.org     实现linux和时间服务器的时间同步
/sbin/hwclock -w  实现bios和linux的时间同步
 
#crontab -l
01 6 * * * sh /root/time.sh
 
例子2:
#crontab -l
01 6 * * * /usr/sbin/ntpdate time.windows.com  >> /root/ntpdate.log
 
 
例子3:
01 6 * * * /usr/sbin/ntpdate asia.pool.ntp.org 
这个时间服务器的ntp会计算网络传输中的误差.

抱歉!评论已关闭.