Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of SHELL DATE command

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Usage: date [- u] [- d datestr] [- s datestr] [--utc] [--universal] [--date=datestr] [--set=datestr] [--help] [--version] [+ FORMAT] [MMDDhhmm [[CC] YY] [.ss]]

Note: date can be used to display or set the date and time of the system. In terms of display, users can set the format they want to display. The format is set to a plus sign followed by several tags. The list of available tags is as follows:

In terms of time:

%: print out

% n: next line

% t: tabbed

% H: hours (00.23)

% I: hours (01.. 12)

% k: hour (0.23)

% l: hour (1.. 12)

% M: minutes (00.59)

% p: show local AM or PM

% r: direct display time (12-hour format in hh:mm:ss [AP] M)

% s: seconds since 00:00:00 UTC on January 1, 1970% S: seconds (00.61)

% T: direct display time (24-hour system)

% X: equivalent to% H:%M:%S

% Z: show time zone

In terms of date:

% a: what day of the week (Sun..Sat)

% A: what day of the week (Sunday..Saturday)

% b: month (Jan..Dec)

% B: month (January..December)

% c: display date and time directly

% d: day (01.31)

% D: direct display date (mm/dd/yy)

% h: same as% b

% j: day of the year (001. 366)

% m: month (01.. 12)

% U: week ordinal of the year (00.53) (with Sunday as the first day of the week)

% w: day of the week (0.6)

% W: week ordinal of the year (00.53) (with Monday as the first day of the week)

% x: direct display date (mm/dd/yy)

% y: last two digits of the year (00.99)

% Y: full year (000.9999)

If you do not start with a plus sign, you want to set the time, and the format of the time is MMDDhhmm [[CC] YY] [.ss]

Where MM is the month

DD is the day

Hh is hour

Mm is minutes

CC is the first two digits of the year

YY is the last two digits of the year

Ss is number of seconds

Set up a plan:

-d datestr: displays the time set in datestr (non-system time)

-help: displays auxiliary messages

-s datestr: sets the system time to the time set in datestr

-u: displays the current Greenwich mean time

-version: displays the version number

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report