The date usage is quite flexible, with N flexible combinations. [Root @ MT ~] # Date & amp; #39; + % D % n % T & amp; #39; 08/11/1113:52:38 [root @ MT ~] # Date + % Y/% M/% d2011/53/11 [root @ MT ~] # Date & amp; #39; + % Y/% M/% d & amp; #39; 2011/53
The date usage is quite flexible, with N flexible combinations.
[Root @ MT ~] # Date '+ % D % n % t'
08/11/11
13:52:38
[Root @ MT ~] # Date + % Y/% M/% d
2011/53/11
[Root @ MT ~] # Date '+ % Y/% M/% d'
2011/53/11
[Root @ MT ~] # Date + % D % n % T
08/11/11
13:53:52
[Root @ MT ~] # Date + % y/% m/% d
11/08/11
[Root @ MT ~] # Date + % Y/% m/% d
[Root @ MT ~] # DATE
Bash: DATE: command not found
[Root @ MT ~] # Date '+ % Y/% M/% d'
2011/55/08/11/11
[Root @ MT ~] # Date '+ % Y/% M/% d'
2011/55/11
[Root @ MT ~] # Date + % Y/% M/% d
2011/55/11
[Root @ MT ~] # Date + % Y/% m/% d
[Root @ MT ~] # Date + % m/% d
08/11
This article is from the blog "do not ask for future"