Posts

Showing posts from September, 2021
Image
  Date Command In Linux  The date  command is simple. However, it has several useful options that enhance it. It's also capable of giving you practical information about past or future dates. date  command is used to display the system date and time. date command is also used to set date and time of the system. Basic Syntax for Date The most basic syntax for the date  command is simply to type in the command with no options and no format controls. cmd:date --date= STRING Basic Format Control Syntax Use one or more format controls to display information. Here is the general syntax: # date +%<format-option> Let's look at a few examples. Use Dashes(-) and Slashes(/) between the fields we use date +"%Y-%m-%d" where %Y is for year ,%M for months and %d is for date,and in between we either use '-'or '/'.  Displaying the Year, Month, and Day fields labeled . We can also labeled by writing date +"YEAR=%y,MONTH=%m,DAY=%d". Set Coordinated Unive...