About
Pricing
Community
Teams
Start Free Trial
Log in
anishtv
asked on
2/12/2016
cleanuptrace
/u01/app/oracle/product/12
.1.0.2/dbh
ome_1/rdbm
s/log
how can we delete the trace files created before 10 days in this location.
Is there any command.
Linux
6
1
Last Comment
anishtv
8/22/2022 - Mon
woolmilkporc
2/12/2016
Assuming that those trace files all end in ".trc":
find /u01/app/oracle/product/12
.1.0.2/dbh
ome_1/rdbm
s/log -name "*.trc" -mtime +10 | xargs rm
Note "+10" means "10 days old
or older
". I think that's what you wanted to say.
anishtv
2/12/2016
ASKER
Some errors
find /u01/app/oracle/product/12
.1.0.2/dbh
ome_1/rdbm
s/log -name "*.trc" -mtime +10 | xargs rm
rm: missing operand
Try `rm --help' for more information.
woolmilkporc
2/12/2016
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/dbh
ome_1/rdbm
s/log -name "*.trc" -mtime +10 -exec rm {} \;
Please note the backslash in front of the semicolon, it's important!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
anishtv
2/12/2016
ASKER
Why these files are still there
-rwxr-xr-x 1 oracle dba 1070 Feb 4 08:46 43397_ora_80664.trc
ASKER CERTIFIED SOLUTION
woolmilkporc
2/12/2016
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
anishtv
2/18/2016
ASKER
good
find /u01/app/oracle/product/12
Note "+10" means "10 days old or older". I think that's what you wanted to say.