Linux定時清理30天前的Tomcat日誌腳本

一、在tomcat的log路徑下新建.sh腳本文件clean.sh,內容如下: #!/bin/bash logs_path="/mnt/tomcat/apache-tomcat-8.5.23/logs" find $logs_path -mtime +30 -name "localhost.*.log" -exec rm -rf {} \; find $logs_path -mtime +30 -
相關文章
相關標籤/搜索