识别 Plone BlobStorage 中的文件
var/blobstorage 中的文件可以通过 Unix 命令按大小列出和排序。这种方式在顶部列表中显示大文件。如何识别这些文件属于 Plone 站点中的哪些 ID/路径?
Files in var/blobstorage can be listed and sorted by their sizes via Unix commands. This way shows big files on top list. How can I identify these files belongs to which IDs/paths in a Plone site?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有“受支持”的方法可以做到这一点。您可能可以编写一个脚本来检查 ZODB 存储,但这会很复杂。如果您想找到 Plone 站点中最大的文件,您可能最好编写一个在 Plone 中运行的脚本,并使用它来搜索(使用 Portal_catalog)所有文件对象(或任何最有可能具有大文件的内容类型)。文件)并对其调用 get_size() 。这应该返回(缓存的)大小,并且您可以删除要清理的内容。
There is no 'supported' way to do this. You could probably write a script to inspect the ZODB storage, but it'd be complicated. If you want to find the biggest files in your Plone site, you're probably better off writing a script that runs in Plone and using it to search (using portal_catalog) for all File objects (or whatever content type is most likely to have big files) and calling get_size() on it. That should return the (cached) size, and you can delete what you want to clean up.