Step 1 of 4
Read free space
Start with one number you can trust.
import shutil
total, used, free = shutil.disk_usage("/")
print(f"free {free / 1e9:.1f} GB of {total / 1e9:.1f} GB")
You are done whenIt prints a sensible number.
A hand reaches out
A script that checks space, finds the heavy folders and runs on a schedule. A learning version inspired by mac-ssd-toolkit.
Step 1 of 4
Start with one number you can trust.
import shutil
total, used, free = shutil.disk_usage("/")
print(f"free {free / 1e9:.1f} GB of {total / 1e9:.1f} GB")
You are done whenIt prints a sensible number.