在AIX 平台批量刪除文件時遇到報錯提示:
ksh: /usr/bin/rm: 0403-027 The parameter list is too long
lsattr -El sys0 -a ncargs ncargs 6 ARG/ENV list size in 4K byte blocks True 修改ncargs值 chdev -l sys0 -a ncargs=64 sys0 changed
解決方法:
<1> find ./ -name "*" -type f -exec rm {} \; 批量刪除$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