Deleting many defect or stats files in /etc/wily/cem/tim/data/out.

Document ID : KB000017470
Last Modified Date : 14/02/2018
Show Technical Document Details


Many files may end up on the TIM due to defect storms or an unresponsive TIM Collector. In UNIX, running a ls or rm command may not work due to file expansion limits. Here are some alternatives.


Using shell scripts and UNIX commands, there are many ways to do this. Some of these are listed below:

find . | xargs -n 50 rm -f        --This deletes 50 files at a time
find . -name \*.xml | xargs -n 50 rm -f -- delete 50 files at a time ending in xml
Example with bash: 
    for f in ( `ls`)
        rm -f $f

There are many links on this topic including: