aix shell 日志压宿及删除
来源:互联网 发布:法式四门冰箱 知乎 编辑:程序博客网 时间:2024/04/29 05:23
#/bin/sh
#add by zhoujf.free log file;
DIR_LIST="/product1/port/bin/ocs_subscriber_import/back"
LOG_LIST="*201*.unl"
GZ_DAY=3
DEL_DAY=30
CORE_DAY=7
CUR_TIME=`date +"%Y%m%d %T"`
echo "START AT [$CUR_TIME]"
for dir in $DIR_LIST
do
if [ ! -d $dir ];then
echo "[$dir] is not existed!"
continue;
fi
echo "Enter directory [$dir] "
cd $dir
for log_part in $LOG_LIST
do
# echo $log_part
find $dir -name "$log_part" -type f -ctime +$GZ_DAY
# find $dir -name "$log_part" -type f -ctime +$GZ_DAY|grep -v .gz|xargs -i gzip -f {}
# find $dir -name "$log_part" -type f -ctime +$DEL_DAY|grep .gz|xargs -i rm {}
done
done
CUR_TIME=`date +"%Y%m%d %T"`
echo "END AT [$CUR_TIME]"
echo ""
exit 0
- aix shell 日志压宿及删除
- AIX 定时清除日志的SHELL
- shell之删除日志
- 删除日志文件的shell
- Shell实现删除历史日志
- 定时删除归档日志shell
- 删除日志的shell脚本
- shell脚本 定期删除日志
- AIX shell
- AIX .tgz的安装包及登录日志查看
- 日志分割及定时删除
- shell脚本删除旧日志文件
- shell脚本:定期删除日志文件
- linux 定期删除spark日志 shell 脚本
- shell脚本删除旧日志文档
- ORACLE在AIX下的安装及删除
- AIX日志管理
- AIX日志管理
- 1.3、For 语句
- 打造行业知名博客需要注意些什么?
- Windows Phone 7的多任务解决方案
- Oracle RAC Cache Fusion 机制 详解
- ftp使用mget批量下载
- aix shell 日志压宿及删除
- asp.net ajax 在updatepanel中使用alert提示方法
- eWebEditor V7.3 for asp.net版本编辑器带后台版本_新增加防止图片木马上传
- 把你的PC桌面打造成Windows Phone 7 Series风格
- Java开发超级工具集
- asp scripmanager
- python中用元组传递函数参数的形式
- php 回显汉字乱码的解决办法
- Dos下查看端口命令