lot_manager/bash/cron_delete_mp4.sh

9 lines
196 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 设置文件保留时间为2天
DAYS=1 # 1代表大于1天即2天
# 使用find命令查找所有符合条件的文件
find /home/pi/mp4 -type f -mtime +$DAYS -exec rm -f {} \;