1.正常就会想到find -mtime +3 -name ‘*.aud' -exec rm -f {};
2. 但是在删这些文件(trc,trm ,aud)的时候,首先要确定系统并没有正在使用这些文件,不关这些文件的mtime是超过了,还是没有。
所以使用fuser 来经行过滤。
3.在11G 里可以使用adrci经行管理;
adrci> show homepath
ADR Homes:
diag/tnslsnr/test/listener
diag/rdbms/test
adrci> set homepath diag/rdbms/test
adrci> show control
ADR Home = /home/oracle/11g_2/diag/rdbms/test:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION
CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- --------------------
----------------------------------------
2639936277 168 720 2013-07-17 02:22:39.987949 -04:00 2013-07-12 15:20:20.966192 -04:00 1 2 80 1
2012-09-07 11:35:52.818634 -04:00
1 rows fetched
adrci> set control(SHORTP_POLICY = 72)
adrci> show control
SHORTP_POLICY 默认是720小时,30天。其控制如下三种文件的保留时间:
(1) Trace files
(2) Core dump files
(3) Packaging information
LONGP_POLICY默认值是8760小时,即365天,1年,其控制如下三种文件的保留时间:
(1) Incident information
(2) Incident dumps
(3) Alert logs