Date Command Exploration in Linux.

Zoro
Sep 26, 2021

Date command is used to print the date and time in different formats.

  • To print the date and time.
  • To go to the manual of the date command.

Cmd : man date

  • To print the date and time in a different format also add a new line to it.
  • To print the week no. of the year and the last two digit of the year.
  • The print the date before or after the present day.
  • To speak the output of the date by integrating it with the espeak-ng command.
  • Another interesting use of the date command is calculating the time in seconds since epoch time or Unix time.

In other words, you will be able to know how many seconds have elapsed since 1 January 1970 00:00:00 UTC to the present time.

Thank you!

--

--