标签 exec 下的文章

服务器上搭建了个云盘,有个 temp 目录存放一些临时文件,想要设定指定天数后自动删除,可以使用 Linux 脚本实现。

用到的命令:
find mtime crontab

基本思路是使用 find 命令筛选符合条件的文件或文件夹,使用 crontab 创建定时任务。

find 的详细用法:https://niekun.net/index.php/archives/543.html
crontab 的详细用法:https://niekun.net/index.php/archives/461.html

阅读全文