Wednesday, October 31, 2012

DATE AND TIME SETTINGS


SET DATE AND TIME

date -s "2 OCT 2006 18:00:00"


You can also simplify format using following syntax:
# date +%Y%m%d -s "20081128"


Linux Set Time

 # date +%T -s "10:13:13"


SET TIME TO CMOS TIME OR SET SYSTEMHARDWARE TIME TO SYSTEM TIME


hwclock --systohc
This will set the hardware clock to the current system time. You can also do the inverse:
hwclock --hctosys
To display what date/time the hardware clock is currently set to:
hwclock --show

No comments:

Post a Comment