How to delete a large number of small trace files in oracle, oracletrace
When files are deleted in batches on the AIX platform, the following error occurs:
Ksh:/usr/bin/rm: 0403-027 The parameter list is too long
Cause:
This is mainly because the AIX Kernel Parameter ncargs is controlled and the command line cache is limited.
Lsattr-El sys0-a ncargs
Ncargs 6 ARG/ENV list size in 4 K byte blocks True
Modify ncargs Value
Chdev-l sys0-a ncargs = 64
Sys0 changed
Solution:
<1> find./-name "*"-type f-exec rm {}\;
Batch Delete $ oracle_base/admin
<2> $ more rm_rc.sh
Files = 'LS-l/oracle/admin/$ ORACLE_SID/bdump | grep trc | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SID/bdump/$ I
Done
$ More rm_dump_file.sh
Files = 'LS-l/oracle/admin/$ ORACLE_SID/bdump | grep trc | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SID/bdump/$ I
Done
Files = 'LS-l/oracle/admin/$ ORACLE_SID/udump | grep trc | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SID/udump/$ I
Done
Files = 'LS-l/oracle/admin/$ ORACLE_SIDump | grep core | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SIDump/$ I
Done