linux系统 shell脚本 定时删除三个月之前的所有文件夹和文件
1、创建shell脚本:
#!/bin/bash
echo "========The script excute begin========"
baseFolder="/apps/tomcat8080/apache-tomcat-8.0.45/webapps/abnormalImg/"
year=$(date +%Y)
month=`date +%m`
monthStr=${month:0:1}
if [ $monthStr -eq "0" ];then
month1=${month#*0}
else..
转载
2020-08-20 16:03:51 ·
1933 阅读 ·
0 评论