想鸟一样飞翔

专注于php开发。对c++也很有兴趣!!!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
#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会计算网络传输中的误差.
posted on 2011-03-03 15:05  redfox  阅读(873)  评论(0编辑  收藏  举报