cleanuptrace

/u01/app/oracle/product/12.1.0.2/dbhome_1/rdbms/log

how can we delete the trace files created before 10 days in this location.
Is there any command.
anishtvAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Assuming that those trace files all end in ".trc":

find /u01/app/oracle/product/12.1.0.2/dbhome_1/rdbms/log -name "*.trc" -mtime +10 | xargs rm

Note "+10" means "10 days old or older". I think that's what you wanted to say.
anishtvAuthor Commented:
Some errors

find /u01/app/oracle/product/12.1.0.2/dbhome_1/rdbms/log -name "*.trc" -mtime +10 | xargs rm
rm: missing operand
Try `rm --help' for more information.
woolmilkporcCommented:
This should only happen when no results are found. In this case use the "-r" flag to make "xargs" silently exit without calling "rm".

Which is your OS (-Release), which is your shell?

You could also try this:

find /u01/app/oracle/product/12.1.0.2/dbhome_1/rdbms/log -name "*.trc" -mtime +10 -exec rm {} \;

Please note the backslash in front of the semicolon, it's important!
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

anishtvAuthor Commented:
Why these files are still there


-rwxr-xr-x 1 oracle dba      1070 Feb  4 08:46 43397_ora_80664.trc
woolmilkporcCommented:
Because this file is not yet 10 days old.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
anishtvAuthor Commented:
good
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.