Linux Command Encyclopedia disk maintenance: Date

Source: Internet
Author: User
Keywords Linux command encyclopedia disk maintenance
Tags aliyun command encyclopedia date disk disk maintenance displays expressed function

Function Description: Displays or sets the system time and date.

Grammar: date&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP;" [-D < string] [-u] [+%h%i%k%l%m%p%r%s%s%t%x%z%a%a%b%b%c%d%d%j%m%u%w%x%y%y%n%t] or date [-s < string >][-u][mmddhhmmccyyss] or date [-- Help][--version]

Supplemental NOTE: The first syntax can be used to display the system date or time, with the% as the beginning parameter as the format parameter, to specify the display format for the date or time. The second syntax can be used to set the system date and time. Only administrators have permission to set date and time. If you do not add any parameters, data displays the current date and time.

Parameters:
%H hours (expressed in 00-23).
%I Hours (expressed in 01-12).
%k hours (expressed in 0-23).
%l hours (expressed in 0-12).
People%m minutes (expressed in 00-59).
%P am or PM.
%r time (including minutes, hours, 12 hours pm to express).
Total seconds of%s. The starting time is 1970-01-01 unlimited UTC.
%s seconds (expressed in local idiomatic notation).
%T time (including minutes, hours, 24-hour system to express).
%x time (expressed in local idiomatic notation).
%Z City.
%a week abbreviation.
The full name of the%A week.
%b the initials of the English name of the month.
%B the full English name of the month.
%c date and time. Just entering the date directive also shows the same result.
%d date (expressed as 01-31).
%d Date (including month date).
%j the first day of the year.
People%m month (expressed as 01-12).
%u number of weeks in the year.
%w the number of days of the week, 0 for Sunday, 1 for Monday, Yan analogy.
The%x date (expressed in local idiomatic notation).
%y year (expressed as 00-99).
%Y year (in four digits).
%n Inserts a new row when it is displayed.
%t Insert tab when displayed.
MM month (necessary).
DD date (necessary).
HH hours (necessary).
MM minutes (necessary).
First two digits of the CC year (selectivity).
The back two digits (selectivity) of the YY year.
SS seconds (selectivity).
-d< string > Displays the date and time that the string refers to. You must enclose the string with double quotes.
-s< string > Sets the date and time according to the string. You must enclose the string with double quotes.
-U displays GMT.
--help online Help.
--version Displays version information.

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.