DATE COMMANDS(Task 1.4)

HEllO GUYS,

Now,here we can see some basic date related commands.

INTRODUCTION:-

Linux date command displays and sets the system date and time. This command also allows users to print the time in different formats and calculate future and past dates.

PREREQUISITES:-

  • A system running Linux
  • A user account with root privileges
  • Access to a terminal window/command line.
SYNTAX:-

The syntax for the date command is:

date [option]... [+format]

SOME BASIC COMMANDS:-

These are the most common formatting characters for the date command:

    • %D – Display date as mm/dd/yy
    • %Y – Year (e.g., 2020)
    • %m – Month (01-12)
    • %B – Long month name (e.g., November)
    • %b – Short month name (e.g., Nov)
    • %d – Day of month (e.g., 01)
    • %j – Day of year (001-366)
    • %u – Day of week (1-7)
    • %A – Full weekday name (e.g., Friday)
    • %a – Short weekday name (e.g., Fri)
    • %H – Hour (00-23)
    • %I – Hour (01-12)
    • %M – Minute (00-59)
    • %S – Second (00-60)
here is the required video for  this above commands




1).date --set="20100513 05:30"
2).date --date="2 year ago"
3).date --date="yesterday"
4).date --date="10 sec ago"
5).date --date="next monday"
6).date --date="4 day"
7).date --date="tomorrow"
8).date +%s
9).$ date -d "1984-04-08" +"%s"

just click this link to see the output of the above the commands












 


Comments

Popular posts from this blog

SELF RELIANCE DIGITAL INDIA

WHAT IS TECHNOLOGY AND WHY TECHNOLOGY,HOW IT'S EVOLVING in NOW-A-DAYS.

TASK 1.3