Chinaunix首页 | 论坛 | 博客
  • 博客访问: 823620
  • 博文数量: 581
  • 博客积分: 7803
  • 博客等级: 少将
  • 技术积分: 3653
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-27 08:21
文章分类

全部博文(581)

文章存档

2013年(7)

2012年(414)

2011年(159)

2009年(1)

分类: LINUX

2011-09-19 09:41:25

1.使用cron建立循环执行的例行性命令
/etc/crontab
  1. 30 4 * * * root run-parts /etc/cron.daily
每天04:30,将执行一次/etc/cron.daily目录下的所有可执行文件。

2.logrorate,全局配置文件为/etc/logrotate.conf
  1. #!/bin/sh
  2. /usr/sbin/logrotate /etc/logrotate.conf
  3. EXITVALUE=$?
  4. if [ $EXITVALUE != 0 ]; then
  5. /bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
  6. fi
  7. exit 0

3.wtmp的配置,/etc/logrotate.d/wtmp
阅读(606) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~