Cleanup trace files Oracle

Cleanup trace files

#!/bin/bash
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_SID=testdb
export ORACLE_SID
# Cleanup trace files more than 3 days old
find $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/*.trc -mtime +3 -exec rm {} \;
find $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/*.trm -mtime +3 -exec rm {} \;