Snippets: Shell: Delete Files Older Than X Days

20th August 2020 at 2:19pm
Snippets: Shell
find /path/to/files/ -type f -name '*.jpg' -mtime +30 -exec rm {} \;

-mtime +30 表示文件已经有至少 30 天这么旧。