Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/scripts/projects-top-size
Views: 275
#!/usr/bin/env bash
# this script tabulates the top N projects by their disk usage

N=${1:-50}

echo "Calculating disk usage of all projects and then reporting the top $N:"

sudo find /projects -maxdepth 1 -type d -print0 | sudo ionice -c 3 parallel --eta -q0 -j4 du -sh  | sort -h | tail -$N