Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem deleting file over 90 days

Status
Not open for further replies.

kukuluku

MIS
May 2, 2002
56
US
Hello,

I was trying to clean up oracle trace and log files. We have 10 databases in this HP machine. The directory pattern is /oracle/admin/DBNAME/udump and /oracle/admin/DBNAME/bdump

Within /oracle/admin, I did

find */bdump/ -mame \* -mtime +90 -print -exec rm -r {} \;
find */udump/ -name \* -mtime +90 -print -exec rm -r {} \;

Or I could have done:
find */bdump/* -mame \* -mtime +90 -print -exec rm -r {} \;
find */udump/* -name \* -mtime +90 -print -exec rm -r {} \;

It seemed to delete old files fine. However, it also remove some bdump directories from half of the databases and some of the bdump directories were not old at all. This cause the shutdown for cold backup fail.

I wonder this is a bug in HP? Has anyone experienced this problem. We are one HP-UX 11.00 9000

Your input is very much appreciated.
 
Try this:
find */bdump/ -mame \* -mtime +90 -print -exec rm -f {} \;
find */udump/ -name \* -mtime +90 -print -exec rm -f {} \;
rm - r - removes the directory

 
For more safety, you should:
cd /oracle/admin/DBNAME/udump
or
cd /oracle/admin/DBNAME/bdump
then

find . -mtime +90 -print
see what files that it finds

and then
find . -mtime +90 -exec rm {} \;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top