date 显示与设置系统时间
-
%Y year
-
%m moth 月
-
%d day 日期
-
%H hour 小时
-
%M minute 分钟
-
%S sec 秒
-
+%F %Y-%m-%d 2018-09-30
-
+%T %H:%M:%S
-
+%w 周几
-
-d 根据描述来显示日期
-
-s 修改日期
举例:
-
date +%F 显示结果:2018-09-30
-
date +%Y-%m-%d 结果显示:2018-09-30
-
date +%y-%m-%d 结果显示:18-09-30
-
date +%T 结果显示:10:30:12
-
date +%H:%M:%s 结果显示: 10:31:21