linux修改系统日期与时间


修改时区cp /usr/share/zoneinfo/UTC /etc/localtime

 

[hayuk@localhost qinghua]$ date
2012年 11月 02日 星期五 08:04:30 CST

[hayuk@localhost qinghua]$ su - root
口令:

[root@localhost ~]# cp /usr/share/zoneinfo/UTC /etc/localtime
cp:是否覆盖“/etc/localtime”? y
[root@localhost ~]# date
2012年 11月 02日 星期五 00:07:30 UTC

 

修改系统日期与时间date -s "2012-11-03 10:25:25"

[root@localhost ~]# date
2012年 11月 02日 星期五 00:08:27 UTC

[root@localhost ~]# date -s "2012-11-03 10:25:25"
2012年 11月 03日 星期六 10:25:25 UTC
[root@localhost ~]# date
2012年 11月 03日 星期六 10:25:27 UTC


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM