anishtv
asked on
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.
how can we delete the trace files created before 10 days in this location.
Is there any command.
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.
find /u01/app/oracle/product/12
rm: missing operand
Try `rm --help' for more information.
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!
Which is your OS (-Release), which is your shell?
You could also try this:
find /u01/app/oracle/product/12
Please note the backslash in front of the semicolon, it's important!
ASKER
Why these files are still there
-rwxr-xr-x 1 oracle dba 1070 Feb 4 08:46 43397_ora_80664.trc
-rwxr-xr-x 1 oracle dba 1070 Feb 4 08:46 43397_ora_80664.trc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.