#!/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
#
###############################################################################
#