Summary of the date command

Source: Internet
Author: User

The date command is a common command for viewing datetime, and date MMDDHHMMYY.SS (the Order of modification) is used to change the time

Linux time is divided into system time and hardware time,

[[email protected] doc]# clock------------------------------------hardware time
April 18, 2016 Monday 10:07 10 sec -0.236080 seconds
[[Email protected] doc]# Date-------------------------------------system time
Monday, April 18, 2016 10:07:14 EDT
[Email protected] doc]#

Man date you'll find out about his commands, where format is the display format

Cases:

[[Email protected] doc]# date +%y2016[[email protected] doc]# date +%m04[[email protected] doc]# date +%m10[[email protect Ed] doc]# Date +%D04/18/16

In addition Hwclock can also be used to display time hwclock-r; hwclock-s;hwclock-w

System time is not equal to hardware time: Use the Hwclock command to modify: Hwclock-w Synchronize system time to hardware
Hwclock-s synchronizing hardware time to the system

Summary of the date command

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.