即使关闭了审计audit_trail=none但aud文件还太多的清理,-bash: /bin/rm: 参数列表过长

[oracle@rac1 adump]$ uptime
 11:21:08 up 534 days, 11:27,  1 user,  load average: 7.20, 8.03, 7.76

[oracle@rac1 adump]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 4 11:16:32 2021

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> show parameter audi;

NAME                                 TYPE        VALUE
———————————— ———– ——————————
audit_file_dest                      string      /oracle/app/oracle/admin/gddb/
                                                 adump
audit_sys_operations                 boolean     FALSE
audit_syslog_level                   string
audit_trail                          string      NONE
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac1 adump]$ pwd
/oracle/app/oracle/admin/gddb/adump
[oracle@rac1 adump]$ ls|wc -l
385980
[oracle@rac1 adump]$ rm -f *.aud
-bash: /bin/rm: 参数列表过长
[oracle@rac1 adump]$ find . -name “*.aud” | xargs rm -f
[oracle@rac1 adump]$ ls|wc -l
1
[oracle@rac1 adump]$ ll
总用量 4
-rw-r—– 1 oracle asmadmin 842 2月   4 11:19 gddb1_ora_184936_20210204111901969897143795.aud

另外节点测试:

[oracle@rac2 adump]$ find . -name “*.aud” | xargs rm -f
[oracle@rac2 adump]$ ll
总用量 4
drwxr-xr-x 2 oracle oinstall 4096 2月   4 11:26 1
-rw-r–r– 1 oracle oinstall    0 2月   4 11:26 1.txt

目录一起删除:

[oracle@rac2 adump]$ find . -name “*.aud” | xargs rm -rf
[oracle@rac2 adump]$ ll
总用量 4
drwxr-xr-x 2 oracle oinstall 4096 2月   4 11:26 1
-rw-r–r– 1 oracle oinstall    0 2月   4 11:26 1.txt
[oracle@rac2 adump]$ find . -name “*” | xargs rm -rf
rm: 无法删除目录:”.”
[oracle@rac2 adump]$ ll
总用量 0

 

相关:

http://www.killdb.com/2020/06/19/%e5%85%b3%e4%ba%8edisk-file-operation-io%e7%9a%84%e4%b8%80%e4%b8%aa%e6%a1%88%e4%be%8b%e5%88%86%e6%9e%90/

    原文作者:好记忆不如烂笔头abc
    原文地址: https://blog.csdn.net/jycjyc/article/details/113631761
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞