Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
BeakerCleanup 似乎不适用于 Zope,因为它需要 .ini 或 .cfg 文件格式。BeakerSession 参数包含在 zope.conf 文件中,显然这不能用于$ <environment>/bin/paster call beaker.scripts.cleanup:cleanup path/to/config.cfg 4h.
$ <environment>/bin/paster call beaker.scripts.cleanup:cleanup path/to/config.cfg 4h
有人能够使它与 Zope 一起工作吗?
另一种方法是设置一个 cron 作业来删除早于指定时间段的目录/文件。
例子:
find <folder_path> -mmin +120 -exec rm -rf {} \;
上述行将删除指定目录中超过 120 分钟的文件。