File size: 470 Bytes
75880e1 142c48b 75880e1 142c48b 75880e1 142c48b 75880e1 142c48b | 1 2 3 4 5 6 7 8 9 10 11 | import os
from pathlib import Path
total = sum(f.stat().st_size for f in Path("/data/matches").rglob("*") if f.is_file())
print(f"/data/matches: {total / 1024**3:.2f} GB")
total2 = sum(f.stat().st_size for f in Path("/data/by-language").rglob("*") if f.is_file())
print(f"/data/by-language: {total2 / 1024**3:.2f} GB")
total3 = sum(f.stat().st_size for f in Path("/data/image-shards").rglob("*") if f.is_file())
print(f"/data/image-shards: {total3 / 1024**3:.2f} GB") |