The date
command outputs the current date and time like this: Fri Apr 12 15:04:03 UTC 2013
.
To have the output date-time in a custom format we can use date +FORMAT
, for example, like this: date "+%Y-%m-%dT%H:%M:%S%:z"
which gives something like 2013-04-12T15:04:37+00:00
.
But I want to know what the %Y
, %m
, %d
, %H
, %M
, %S
, etc. are collectively called (i.e. the terminology). Also, what's the T
called, as it's different from the rest?
date
And the “T” is just a literal “T”.%Y
and their respective meaning.date +"You will die in the year %Y"
T
not being special. Also, I was having a weird day at work when I typed that (listening to co-workers' conversations).