Linux Date/hwclock commands

Source: Internet
Author: User
Tags rfc

Date specifies a specific format for displaying the current time or setting the system time

-D,--date=string the time given a string and then displays it in a specific format

Date-d 2016-11-04 +%a
Date--date 2016-11-04 +%a

-F,--file=datefile displays each line in the file in a specific time format

Date-f file +%a

-R,--reference=file displays the last modified time of the file

-R,--rfc-2822 display time in RFC 2822 format

-S,--set=string set the system time

Date-s 20161101

Date-s 2016-11-01

Date-s 15:15:02

Date-s ' 20161101 15:15:02 '

-U,--UTC,--universal set UTC time, World Time Coordinated,utc, UTC equals the average sun on the Prime meridian (that is, longitude 0 degrees), used to mean GMT (GMT) in the past. to represent. Beijing time is 8 hours earlier than UTC time, with January 1, 1999 0000UTC as an example, UTC time is 0 points, and Beijing time is January 1, 1999 8 o'clock in the morning.

Hwclock Set hardware time (RTC)

-R,--show display system time
-W,--SYSTOHC synchronizes system time to hardware time
-S,--hctosys Synchronize hardware time to System time
-V,--version displays version information for Hwclock
--set--date=newdate Setting Hardware time

command can also synchronize the time between the system and the hardware

Clock-w synchronizing system time to hardware time
Clock-s synchronizing hardware time to System time

Linux Date/hwclock commands

Related Article

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.