#!/usr/bin/ksh
cd /oracle/DB1/admin
#-->when mount point is more than 70% used.
if [[ `df -k . | grep <your udump mount point> | awk '{print $4}' | tr -d "%"` -gt 70 ]] then
cd /oracle/DB1/admin/udump
#-->list files older than 2 days
find . -mtime +2 -print
#--> remove files older than 2 days
#find . -mtime +2 -exec rm {} \;
#-->list files older than 25 minutes
find . -type f -mmin +25 -print
#--> remove files older than 25 minutes
#find . -type f -mmin +25 -exec rm {} \;
fi
No comments:
Post a Comment