Oracle XE: Clearing out unwanted trace files

Posted by Christian Ashby on April 9, 2010

If left unchecked, Oracle XE installations can balloon in size quite quickly – this is due to the trace files being written by the server. The following run in a cron script can be used to remove files more than 7 days old.

find $ORACLE_HOME/../../../admin/$ORACLE_SID/bdump -name "*.trc" -mtime +7 -exec rm "{}" \;
find $ORACLE_HOME/../../../admin/$ORACLE_SID/udump -name "*.trc" -mtime +7 -exec rm "{}" \;
find $ORACLE_HOME/../../../admin/$ORACLE_SID/cdump -name "*.trc" -mtime +7 -exec rm "{}" \;

This tip was found and modified for XE in the following a useful article ‘Oracle Linux – Using the “find” command to manage files’.


Leave a Reply