又学了一招 修改linux的系统时间
一般安装linux的时候系统的时间不准确,但是时间对我们做程序或者维护的人员来说太重要了。
修改的方法如下 如果你的英文水平非常好你也可以使用如下命令下查看一下怎样修改的命令
date --help
你会看到如下结果
[root@localhost ~]# date --help
Usage: date [OPTION]... [+FORMAT]
or: date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
Display the current time in the given FORMAT, or set the system date.
-d, --date=STRING display time described by STRING, not `now'
-f, --file=DATEFILE like --date once for each line of DATEFILE
-r, --reference=FILE display the last modification time of FILE
-R, --rfc-2822 output date and time in RFC 2822 format
--rfc-3339=TIMESPEC output date and time in RFC 3339 format.
TIMESPEC=`date', `seconds', or `ns' for
date and time to the indicated precision.
-s, --set=STRING set time described by STRING 设置时间 以字符串的形式设置
-u, --utc, --universal print or set Coordinated Universal Time
--help display this help and exit
--version output version information and exit
[root@localhost ~]# date -s '11:34:30 2014-11-03'
设置时间的方法上边的照做 应该就没问题。