Date command summary, date Summary

Source: Internet
Author: User

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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.