Linux Date Time command

Source: Internet
Author: User

Date

    • Role

System time management, printing or setting the system date and time.

    • Options

--help: Displays help information.

--version: Displays version information.

-D: Displays the date and time that the string refers to, and the string must be preceded by a double quotation mark.

-S: Sets the date and time based on the string, and the string must be preceded by double quotation marks.

    • Format

%Y: Year.

%y: Year, after two digits.

%m: Month.

%d: day.

%H: Hours, 0-23.

%M: Min, 00-59.

%s: seconds, 00-60.

The%%:% string.

%n: New line.

%d: date, equivalent to%m/%d/%y.

%F: Date, equivalent to%y-%m-%d.

%R: Hours and minutes, equivalent to%h:%m.

Clock

    • Role

Hardware time management.

Hwclock:hardware Clock

    • Role

Query, set hardware time.

    • Options

-S: Synchronizes hardware clock to system time.

--hctosys: Synchronizes the hardware clock to the system clock.

-W: Synchronizes the system clock to the hardware clock.

--SYSTOHC: Synchronizes the system clock to the hardware clock.

Cal:calendar

    • Role

Displays the calendar.

    • Options

-1: Displays the current month calendar.

-3: Displays the current month and the calendar for each January before and after the current month.

-y: Displays the current year's calendar.

    • Parameters

The year to display.

Linux Date Time 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.