Does anyone have the code to remove trace files that are older than a certain date ?
without knowing some particulars, a variation on find . -new 'keeper file name' -print | rm would work. (Substitute a real file name where obvious). other variations would use -mtime, -ctime or -atime parameters of find.
Joseph R.P. Maloney, CSP,CDP,CCP 'The answer is 42'
find . -name *trc -atime +7 -exec rm {} \; if on NT get there are some nt ports available of the common unix commands
There are lots of variations on find. man find will give you the details...
Jeff Hunter marist89@yahoo.com http://marist89.blogspot.com/ "I pledge to stop eating sharks fin soup and will not do so under any circumstances."
If your installation follows OFA, the following command will trim logs that have not been accessed withing the past 7 days... *** replace ? with your database name (i.e ORCL) *** find $ORACLE_HOME/admin/?/bdump -name "*.trc" -atime +7 -exec rm {} \;
alapps Fast, Cheap, Reliable... Pick Two(2)
Thankyou rfmm1 amd alapps, that was exactly what I was looking for.
Forum Rules
Bookmarks