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

简明Linux命令行笔记:hwclock

2012年09月20日 ⁄ 综合 ⁄ 共 309字 ⁄ 字号 评论关闭
文章目录

显示或设置CMOS时间

hwclock [options]

 

选项

-r               默认选项,读取并打印CMOS时间

-s               将CMOS时间设置为系统时间

-w               将系统时间设置为CMOS时间

 

示例

hwclock

Darling siu # hwclock
2013年01月17日 星期四 23时48分39秒  -0.234902 seconds

显示CMOS时间

 

hwclock -s

Darling siu # hwclock -s
Darling siu # date
2013年 01月 17日 星期四 23:50:06 CST

将CMOS时间设置为系统时间

 

Tips:

hwclock命令需要root权限才能执行

 

抱歉!评论已关闭.