# 2013/04/03  crms00408771  Ting HE
#   VHE Enhancement: Set the code dump file size limite to unlimited
# 
#!/bin/sh  
CORE_DIC=/data/core
SIZE=`du -s $CORE_DIC | awk '{ print $1 }'`
if [ $SIZE -gt 12288 ]
    then
    FILES=$(ls -t $CORE_DIC)
    CNT=0
    for f in $FILES;
        do 
        CNT=`expr $CNT + 1`
        if [ $CNT -gt 2 ]
            then
            rm -f $CORE_DIC/$f
        fi
    done
fi

