ODOC: date

date – Print & set the system data & time


date will print the time information in different formats and we can also make a custom formats using the options.


$ date == print the current date and time

$ date -d ‘3year ago’ == Same date but 3 yr ago(see how user friendly linux is?)

$ date –set=’-10 minutes’ == Reduce 10 min in the current time

$ date ‘+%b %_e %a %X %Z %Y’ == Current date in custom format.

Read : info date, man date

Tech Tags: linux