sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

easy way for users to get an overview of exactly how their disk space is being used in a given folder #6426

Open williamstein opened 1 year ago

williamstein commented 1 year ago

In every operating system, it's standard to use some sort of tool to figure out how you're using up your disk space, and there's often nice graphical tools for doing this. CoCalc also would benefit from something like this.

Right now, the best option is to open a Terminal (+New --> "Linux Terminal"), then type

~$ du -sch .[^.]* *

to get all usage, including a total at the bottom.

and

~$ du -ch .[^.]* * |sort -h

to get a sorted summary.

Since snapshots are not controllable by the user in cocalc, and also do NOT count against disk usage, they should get excluded. Since it's time consuming to compute their usage, it would be nice if du could exclude them as well (via a better regexp).

Even though I've been doing this sort of thing in UNIX for decades, I still can't easily remember how to get the hidden directories properly, so this would be valuable.

I don't know where in cocalc to put this. Some ideas:

It's not at all clear to me which of the above is a good idea.

DrXyzzy commented 1 year ago

Seems there are two problems, 1) where to put this in the UI and 2) back-end semantics, what info to display (all folders vs just one selected folder, on-demand vs cached info).

I like the last option best. Directory space use is provided on demand, without burdening people who rarely want it. I don't think it belongs in project settings because that page is already too cluttered.