Sitemap
Press enter or click to view image in full size

Explore the date command

2 min readSep 24, 2021

--

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
Press enter or click to view image in full size
  • +%Y – Year (e.g., 2020)
Press enter or click to view image in full size
  • +%m – Month (01-12)
Press enter or click to view image in full size
  • +%B – Long month name (e.g., September)
Press enter or click to view image in full size
  • +%b – Short month name (e.g., Sep)
Press enter or click to view image in full size
  • +%j – Day of year (001-366)
Press enter or click to view image in full size
  • +%u – Day of week (1-7)
Press enter or click to view image in full size
  • +%A – Full weekday name (e.g., Friday)
Press enter or click to view image in full size
  • +%H – Hour (00-23)
Press enter or click to view image in full size
  • +%M – Minute (00-59)
Press enter or click to view image in full size
  • +%S – Second (00-60)
Press enter or click to view image in full size

So That's all for today :)

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

--

--

No responses yet