AIX系统修改系统时间
2015-08-05 11:24
330 查看
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。
而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。
相关文章推荐
- AIX mount: 0506-351 错误处理
- 如何在 Linux 上安装、配置 NTP 服务器和客户端?
- 0403-027 The parameter list is too long
- Chrony:一个类 Unix 系统上 NTP 客户端和服务器替代品
- DB2 日期和时间的函数应用说明
- flex actionScript时间处理相加返回相加后的date
- Delphi实现读取系统时间与日期完整实例
- Lua常用时间函数使用实例
- asp格式化日期时间格式的代码
- Powershell小技巧之通过EventLog查看近期电脑开机和关机时间
- 比较简洁的JavaScript 实时显示时间的脚本 修正版
- C#简单读取、改变文件的创建、修改及访问时间的方法
- C语言循环结构与时间函数用法实例教程
- C#获取指定目录最后写入时间的方法
- php mssql 时间格式问题
- php实现的Timer页面运行时间监测类
- sqlite时间戳转时间语句(时间转时间戳)
- 页面导出为Excel的时间格式的问题
- Javascript中的getUTCHours()方法使用详解
- JS中处理时间之setUTCMinutes()方法的使用