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。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值