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