blob: bfcb47aa7ae79b1abde0364f31cccdcff9bb07b0 [file] [log] [blame]
Devin Lim49200ec2018-01-19 16:17:41 -08001function beforeClean{
2 echo -e "\n Before clean up disk usage: \n"
3 df -h
4}
5function cdTolog{
6 cd /home/$1/OnosSystemTest/TestON/logs
7}
8function cleaning{
9 if [ $? -eq 0 ]
10 then
11 echo "Checking if there are logs older than ${DAYS_OLD} days...."
12 for i in $(find . -mtime +${DAYS_OLD} -type d)
13 do
14 echo -e "DIRs older than $DAYS_OLD are: "
15 echo $i
16 rm -rf $i
17 done
18 fi
19}
20function afterClean{
21 echo -e "\n After clean up disk usage:\n"
22 df -h
23
24}