Some times we will have huge number old trace files in ORACLE HOME which are not required. Below are the steps to clean up based on time
Find out trace file generated a month ago
find /u01/app/prod/oracle/admin/udump -mtime +30 -exec ls -ltrh {} \;
Then proceed for removing.
find /u01/app/prod/oracle/admin/udump/udump -mtime +30 -exec rm {} \;
-mtime can be changed based on the requirement.
We can use rm -rf , But should be very careful.
Below is for removing files on particular day using simple for loop.
Example, I wanted remove file on Jul 31.
cd /u01/app/prod/oracle/admin/udump
for i in `ls -l |grep " Jul 31" | awk '{ print $9}'`
do
rm $i
done
No comments:
Post a Comment