Linux系统时间查看与设定
Linux系统时间查看与设定查看:
# date
六 11月 29 21:34:40 CST 2008
设定:
# date 112921242008.29
六 11月 29 21:24:29 CST 2008
格式:date 月日时分年.秒
date -s 11/29/08
date -s 11:29:29
Linux硬件时钟查看与设定
把系统时间强制写入CMOS
# hwclock -w
查看:
# hwclock --show
2008年11月29日 星期六 01时34分43秒 -0.406003 seconds
设定:
# hwclock --set --date="11/29/2008 22:29:00"
# hwclock
2008年11月29日 星期六 22时29分11秒 -0.321602 seconds
系统时间和硬件时间的同步:
# hwclock --hctosys
# hwclock --systohc
--hctosys set the system time from the hardware clock
--systohc set the hardware clock to the current system time
页:
[1]