Explore the date command

In this article, we will discuss some interesting options in the date command :)

So let's begin:-

The date command is used to display the system date and time. By default, the date command displays the date in the time zone on which the Linux operating system is configured. It is most commonly used to print the date and time in different formats and calculate future and past dates.

Let’s start to explore the date options :)

  • +%D – Display date as mm/dd/yy
  • +%Y – Year (e.g., 2020)
  • +%m – Month (01-12)
  • +%B – Long month name (e.g., September)
  • +%b – Short month name (e.g., Sep)
  • +%j – Day of year (001-366)
  • +%u – Day of week (1-7)
  • +%A – Full weekday name (e.g., Friday)
  • +%H – Hour (00-23)
  • +%M – Minute (00-59)
  • +%S – Second (00-60)

So That's all for today :)

I hope you like my article, I very thank full to you to read my article. :)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store