如何找到整个在线打开目录的大小?

问题描述 投票:0回答:1

我想知道在线打开目录的总大小。我怎样才能做到这一点?

一个示例用例可能是找出存储库镜像的大小。

如何找到打开目录的总大小,例如:http://old-releases.ubuntu.com/,或http://download.kiwix.org/,或http://apollo.sese.asu.edu/data/

filesize directory-structure rclone
1个回答
1
投票

这是一种在线查找任何打开目录大小的快速而简单的方法。

TL; DR

安装rclone并将URL替换为您想要的任何内容。

安装Rclone(二进制可用here

curl https://rclone.org/install.sh | sudo bash

获取目录大小(将URL替换为任何打开的目录,请确保不要删除:http:

rclone size --http-url http://old-releases.ubuntu.com/ :http:

说明

使用rclone + http和可选的mount就可以了。

这使您可以自由地使用各种方法检查大小。 rclone size http:rclone mount http: directory/然后cd directory/du -shdu -hd1ncdufrom here)或(不推荐)ls -shR

善待

您可能希望通过调整值并在此命令中可选地添加/删除--fast-list来避免锤击服务器:

rclone size http: -v --tpslimit 5 --bwlimit 500K --checkers 5 --fast-list

根据您的需要以及您认为服务器可以处理的内容进行调整。例如,在短短几分钟内,我就可以在服务器上使用rclone size,我认为它可以很好用,并且返回了这些结果。

例子

$ rclone size --http-url http://apollo.sese.asu.edu/data/ :http: --checkers 100

Total objects: 195669
Total size: 123.619 TBytes (135920738673216 Bytes)

$ rclone size --http-url http://download.kiwix.org :http: --checkers 100
Total objects: 24624
Total size: 5.711 TBytes (6279328743124 Bytes)
© www.soinside.com 2019 - 2024. All rights reserved.