5ff52d525fe524184.png_fo742.png

```bash
#!/bin/bash
#Oct,20, to clean catalina logs quickly.
logPATH=/opt/SucTomcat/logs
DaysToRemain=30

if [ -d "$logPATH" ]; then #avoid to mismatch.
cd $logPATH
cat /dev/null >catalina.out
find . -ctime +$DaysToRemain -type f | xargs rm -f
else
echo 'No logPATH found!'
fi

```

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code