Linux自动更新时间

Can use ntpdate or rdate command to sync the datetime with remote server.

i.e.:
# ntpdate remote_server

or
# rdate -s remote_server

Also, sync the remote server periodically is a good idea!
# crontab -e

# auto sync with time server at 0:00 everyday
0 0 * * * rdate -t 60 -s stdtime.gov.hk

posted on 2008-04-11 09:48 毒菇求Buy 阅读(4914) 评论(3)  编辑 收藏 引用 所属分类: Linux

评论

# re: Linux自动更新时间 2009-06-18 18:33 liuliu

很好,,谢谢楼主了。  回复  更多评论   

# actan 2009-07-25 14:11 actan

不错,受用了!
谢谢  回复  更多评论   

# re: Linux自动更新时间 2009-09-02 17:12 Tonny,k

详细步骤:
1.less /etc/ntp.conf
找到 server 0.centos.pool.ntp.org
Server 1.centos.pool.ntp.org
.............
2.ntpdate server 0.centos.pool.ntp.org

等待数秒,自动更新。
可以用clock
date核对2个时间是否一致。
如果不一致,需要更新文件。
可以加我qq:157380943  回复  更多评论   

只有注册用户登录后才能发表评论。
<2008年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

导航

统计

常用链接

留言簿(7)

随笔分类(133)

随笔档案(111)

文章分类(65)

文章档案(53)

相册

收藏夹(30)

BLOG

Book store

Graphics Design

搜索

最新评论

阅读排行榜

评论排行榜