date(1)

Create dates stuff

Get year-month-day

Probably what you wanna have for prefixes, like always:

$ date +"%Y-%m-%d"
# => 2016-08-14

$ date -I
# => 2016-08-14

Get day-month-year

$ date +"%m-%d-%Y"
# => 08-14-2016

Get unix epoch time

Time since unix epoch, unix epoch, epoch time

$ date +'%s'
# => 1471126359

Get ISO date

ISO date can have varying specificity. It defaults to "date" but also accepts "hours", "minutes", "seconds" and "ns":

$ date -I
# => 2016-08-14

$ date --iso-8601=seconds
# => 2016-08-14T00:19:11+02:00

See Also

results matching ""

    No results matching ""