7 lines
206 B
Bash
7 lines
206 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# 指定目标目录
|
||
|
target_dir="/data/update/package"
|
||
|
|
||
|
# 使用find命令找到目标文件并删除超过一个月的文件
|
||
|
find "$target_dir" -maxdepth 1 -type f -mtime +30 -exec rm -f {} \;
|