Date command summary, date Summary
The date command is a common command for viewing date and time. The date MMDDhhmmYY. ss (change order) is used to change the time.
Linux time is divided into system time and hardware time,
[Root @ www doc] # clock -------------------------------------- hardware time
Monday, January 10, April 18, 2016-0.236080 seconds
[Root @ www doc] # date --------------------------------------- system time
Monday, April 18, 2016 10:07:14 EDT
[Root @ www doc] #
After man date, you will find the command about him, where format is the display format
Example:
[root@www doc]# date +%Y2016[root@www doc]# date +%m04[root@www doc]# date +%M10[root@www doc]# date +%D04/18/16
In addition, hwclock can also be used to display the time hwclock-r; hwclock-s; hwclock-w
If the system time is not the same as the hardware time, run the hwclock command: hwclock-w to synchronize the system time to the hardware.
Hwclock-s synchronizes hardware time to the System