Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15175078
  • 博文数量: 7460
  • 博客积分: 10434
  • 博客等级: 上将
  • 技术积分: 78178
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-02 22:54
文章分类

全部博文(7460)

文章存档

2011年(1)

2009年(669)

2008年(6790)

分类:

2008-05-11 22:13:51

继上文http://blog.chinaunix.net/article.php?articleId=60120&blogId=739 ,事后,又想了一个改变时区且不需要重启的方法,分为两步:

1、执行这个脚本
chtz BEIST-8
export TZ=BEIST-8
echo export TZ=BEIST-8 >> /etc/profile

cat <<"!" >/etc/rc.shutdown
ed /etc/profile <g/^export TZ=/d
g/^TZ=/d
g/^export TZ$/d
w
.
!!
rm -f $0
!
chmod a+x /etc/rc.shutdown

2、用smit date调整时间

其它:
已经login的用户,要么export TZ=BEIST-8,要么logout后重新login;
应用(如:DB2)是否也要重启,或者必须不重启,不清楚。

阅读(1220) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~