您好,欢迎来到暴趣科技网。
搜索
您的当前位置:首页aix 修改服务器时间,AIX修改系统时间

aix 修改服务器时间,AIX修改系统时间

来源:暴趣科技网

linux下用date -s "20131215 09:02:25"把时间设为2013年12月15日9点2分25秒。

而aix呢?它不认-s这个参数:

date -n mmddHHMMYY,mm表示月分,dd表示日期,HH表示小时,MM表示分钟,YY表示年份。

如:date -n 1215090213表示把当前时间设为2013年12月15日9点2分,秒数无法修改。

MAN中的解释如下:

[@more@]

Syntax

To Set the Date and Time as Root User

/usr/bin/date [ -n ] [ -u ] [ Date ] [ +FieldDescriptor ... ]

The following formats can be used when setting the date with the Date

parameter:

* mmddHHMM[YYyy]

* mmddHHMM[yy]

The variables to the Date parameter are defined as follows:

mm

Specifies the month number.

dd

Specifies the number of the day in the month.

HH

Specifies the hour in the day (using a 24-hour clock).

MM

Specifies the minute number.

YY

Specifies the first two digits of the year. Note: If you do not

specify the first two digits of the year, values in the range 69

to 99 refer to the twentieth century, 1969 to 1999 inclusive, and

values in the range 00 to 68 refer to years in the twenty-first

century, 2000 to 2068 inclusive.

yy

Specifies the last two digits of the year. Note: The date command

accepts a 4 digit year as input. For example, if a four-digit year

is specified, the date command tries to set the year to "YYyy" and

fails for values which are out of range (less than 1970 and

greater than 2037).

例如:

# date

Sun Dec 15 14:54:35 GMT+01:00 2013

# date 12150902

如果要修改秒数:

#smitty system (进入修改时间界面)

根据提示 选择 修改系统时间选项 回车

(英文版本的应该是:  选择"Change / Show Date and Time"回车,再选择"Change /Show Date & Time"回车)

------------------------------------------

年 (00-99)                                       [10]                     #YEAR

月 (01-12)                                       [12]                     #MONTH

日 (1-31)                                        [01]                     #DAY

时 (00-23)                                       [14]                     #HOUR

分 (00-59)                                       [11]                     #MINUTES

秒 (00-59)                                       [38]                     #SECONDS

-------------------------------------------

把光标移动到 对应的[10],[12],[01],[14]上,然后输入想要修改的数字,按回车,OK。

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- baoquwan.com 版权所有 湘ICP备2024080961号-7

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务