linux 查询修改系统时间

date 帮助:  date --help

# date:  查询当前时间 

Sun Aug 5 23:59:56 CST 2012

# date -s :设置系统时间

设置时间为1999年11月28号。 
# date -s 991128 
Sun Nov 28 00:00:00 CST 1999

例:设置时间为2008年8月28号13:00 
# date -s "2008-08-28 13:00:00"

修改完后,记得输入:clock -w 
把系统时间写入CMOS


# date '+The date of today is:%x ,it is:%X ' 
 The date of today is:14/04/04 ,it is:10:33:01
 其中% x 显示日期的格式(mm/dd/yy),% X 显示时间的格式(%H:%M:%S)。 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章