摘要:
shell sh 每天备份log文件#!/bin/bash# 每天备份log文件log_path="/home/fdipzone/logs" # log目录backup_path="/home/fdipzone/logs/bak" # 备份目录expire=30 # 备份文件只保留30天function backup(){ if [ -d "$log_path" ] && [ -d "$backup_path" ]; then for file in $(find $log_path -maxdep 阅读全文