First, Introduction
The date in Liunx is a very common command used to display the modified time, as follows
Second, the syntax format
usage:date [OPTION] ... [+format]
Iii. Common Options
%y #显示年份的最后两位
%Y #显示Full year
%m #显示月份
%M #显示分钟
%h #显示月
%H #显示小时
%s # from January 1, 1970 00:00:00 to the number of seconds currently experienced
%I #显示小时12小时制的
%K #显示小时24小时制的
%s #显示秒
%c #显示日期和时间
%d #显示日
Iv. Common time settings (refer to the online article collation)
Date-s//Set current time, only root privileges can be set, others can only be viewed.
Date-s 20150523//set to 20150523, this will set the specific time to empty 00:00:00
Date-s 01:01:01//Set time, no changes made to date
Date-s "01:01:01 2015-05-23″//so you can set the whole time
Date-s "01:01:01 20150523″//so you can set the whole time
Date-s "2015-05-23 01:01:01″//so you can set the whole time
Date-s "20150523 01:01:01″//so you can set the whole time
This article is from the "10852974" blog, please be sure to keep this source http://10862974.blog.51cto.com/10852974/1774151
Usage of the date command below Linux (top)