Explore date command and with options and try to use every option.

Explore date command and with options and try to use every option.

The date command displays or sets the system date. It is most commonly used to print the date and time in different formats and calculate future and past date.

Linux date command basic usage

  1. To print the current date and time, just type “date” in terminal.

No alt text provided for this image

2. This option lets you display the date and time in any format. This would not affect the system’s date and time. It will remain the same.

No alt text provided for this image

3. This option lets you display the past days as well as future dates.

No alt text provided for this image
No alt text provided for this image

4. Date and time of the future

No alt text provided for this image
No alt text provided for this image

5. Using this command, we could save the date in the file.

No alt text provided for this image

6. This Linux date command option is used to display the last modified timestamp of a file.

No alt text provided for this image

Format specifiers

  • %D: Display the date as mm/dd/yy
  • %d : Display the day of the month.
  • %a : Display the abbreviated name for weekdays
  • %A: Displays full days
  • %h : Display abbreviated month name
  • %b : Displays abbreviated month name
  • %B : Displays full month name
  • %m : Displays the month of year.
  • %y : Display last two digits of the year
  • %Y : Display four-digit year
  • %T : Display the time in 24 hour format as HH:MM:SS
  • %H : Display the hour.

No alt text provided for this image
No alt text provided for this image

THANKS FOR READING :)


要查看或添加评论,请登录

KARTIK LOKARE的更多文章

  • How to read data stored in RAM?(Memory Forensic)

    How to read data stored in RAM?(Memory Forensic)

    What is RAM and What data RAM contains? Random-access memory (RAM) is a computer’s short-term memory. None of your…

  • Object Recognition using CNN model

    Object Recognition using CNN model

    Step 1: Create an ML model detecting vehicle number plate Step 2: Display the screen showing the WebApp taking the…

  • Kubernetes Integration with Python-CGI

    Kubernetes Integration with Python-CGI

    Kubernetes Kubernetes (also known as k8s or “kube”) is an open source container orchestration platform that automates…

    3 条评论
  • Javascript Integration with Docker

    Javascript Integration with Docker

    Python CGI with Docker (Task 7) In this project, I have integrated python with Docker !! Python is one of the most…

    2 条评论
  • Industry Usecase of JavaScript

    Industry Usecase of JavaScript

    August 12, 2021 Introduction JavaScript is a programming language used primarily by Web browsers to create a dynamic…

    2 条评论
  • K-Means Clustering - Use Cases

    K-Means Clustering - Use Cases

    What is Clustering? Clustering is one of the most common exploratory data analysis technique used to get an intuition…

  • Understanding Confusion Matrix

    Understanding Confusion Matrix

    Hello Everyone… Today I am here with a interesting article. Which is based on Confusion Matrix.

    3 条评论

社区洞察

其他会员也浏览了