歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux系統下date命令及相關時區祥解

Linux系統下date命令及相關時區祥解

日期:2017/2/28 17:48:50   编辑:Linux教程

date //顯示當前日期

date -s //設置當前時間,據說只有root權限才能設置,其他只能查看。

date -s 20061010 //設置成20061010,這樣會把具體時間設置成空00:00:00

date -s 12:23:23 //設置具體時間,不會對日期做更改

date -s “12:12:23 2006-10-10″ //這樣可以設置全部時間

在RedHat Linux裡date命令默認顯示的是如下格式:

Tue Oct 24 20:18:11 CST 2006

格式可以指定,其實看得懂就行,指定格式一般沒多大意義。

Copyright © Linux教程網 All Rights Reserved