【发布时间】:2016-04-01 14:00:10
【问题描述】:
我需要编写一个自动删除临时文件并每天在后台运行的 bash 脚本。
#!/bin/bash
while true;
do
rm /home/c/temp/*
sleep 24h
done
但它不起作用
【问题讨论】:
-
看一下 cron / crontab 这类的东西 .. 或者可能是 cron.daily 文件。 :serverfault.com/questions/135906/when-does-cron-daily-run