function beforeClean{ | |
echo -e "\n Before clean up disk usage: \n" | |
df -h | |
} | |
function cdTolog{ | |
cd /home/$1/OnosSystemTest/TestON/logs | |
} | |
function cleaning{ | |
if [ $? -eq 0 ] | |
then | |
echo "Checking if there are logs older than ${DAYS_OLD} days...." | |
for i in $(find . -mtime +${DAYS_OLD} -type d) | |
do | |
echo -e "DIRs older than $DAYS_OLD are: " | |
echo $i | |
rm -rf $i | |
done | |
fi | |
} | |
function afterClean{ | |
echo -e "\n After clean up disk usage:\n" | |
df -h | |
} |