#!/bin/bash
#@loyu
#
##############################################################################
#
sum=`df -h | awk ‘{print $5}‘ | sed -n 4p | awk -F% ‘{print $1}‘`
if [ $sum -gt 75 ]
then
date=`date +%Y%m%d`
echo -e "\npdt"
echo $date
#pdt
find /home/oracle/RAC-backup/weekly_full/ -mtime +15 | xargs rm -rf
find /home/oracle/RAC-backup/recovery/ -mtime +15 | xargs rm -rf
find /home/oracle/RAC-backup/controlfile/ -mtime +15 | xargs rm -rf
find /home/oracle/RAC-backup/archivelog/ -mtime +15 | xargs rm -rf
#pre-pdt
find /home/oracle/pre-oracle/save/ -mtime +15 | xargs rm -rf
fi
#
###############################################################################
#
本文出自 “流星宇” 博客,谢绝转载!
原文地址:http://8789878.blog.51cto.com/8779878/1770870