| 用途 | 批量运行目录中的可执行脚本 |
|---|---|
| 语法 | run-parts [--test|--report|--reverse] 目录 |
常用示例
常用示例
run-parts --test /etc/cron.hourly # 干跑:列出将执行的脚本
run-parts --report /etc/cron.daily # 执行并打印每个脚本名
run-parts --reverse --report /etc/cron.daily
run-parts /etc/cron.weekly 2>&1 | tee /tmp/weekly.logDebian 与 RHEL 的 run-parts 参数略有差异(RHEL 在 crontabs 包内);脚本名只允许字母数字下划线和连字符。