Displays the current time in a specified format

1.date command default output time format
Displays the current time in a specified format
2. Customize the format of the output current time
, such as: the "20181209211008" current time format
Displays the current time in a specified format
3. The command interpreter
date: display the current time
"": double quotes indicate weak references, the variable display quotes value
+: fixed format
% Y: digitally display the current year, the result: 2019
% m: digitally displays the current month, the results: 08
% D: digitally displayed currently is the date: result: 10
% H: digitally display the current time points: results: 14
% M: a digital bit displays the current time: results: 03
% S: digitally display the current time for a few seconds: results: 42

Guess you like

Origin blog.51cto.com/14483057/2428324