Loading...

Using date in the shell

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

A small example how to use the date function in the linux shell. For ISO-Format yyyy-MM-dd%Y-%m-%d

pi@dojo:~$ echo $(date +%Y-%m-%d)
2013-01-23

With time

pi@dojo:~$ echo $(date +%Y-%m-%d\ %H:%M:%S)
2013-01-23 21:37:09
Please remember the terms for blog comments.