// project
Folder Size Analyzer
A fast, color-coded Zsh script for macOS that maps disk usage across directories and surfaces storage hogs instantly - built for real daily sysadmin use.
Features
- ▸ Color-coded output: red (GB), yellow (large MB), green (smaller)
- ▸ Overall disk usage overview at a glance
- ▸ Configurable scan depth and result count
- ▸ Results sorted largest-first
- ▸ Uses native
du- no dependencies - ▸ Suggests common macOS space hog locations
Sample Output
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Folder Size Analyzer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanning: ~ Depth: 1 Top: 10
Used: 234G / 500G (47%)
SIZE FOLDER
45G ~/Library
23G ~/Movies
12G ~/Downloads
8.5G ~/Documents
1.2G ~/Desktop
Folder Size Analyzer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanning: ~ Depth: 1 Top: 10
Used: 234G / 500G (47%)
SIZE FOLDER
45G ~/Library
23G ~/Movies
12G ~/Downloads
8.5G ~/Documents
1.2G ~/Desktop
Usage
# Scan home directory
folder-size-analyzer ~
# Scan with depth 2, show top 10
folder-size-analyzer /Users -d 2 -n 10
# Deep dive into Library
folder-size-analyzer ~/Library -d 3 -n 15
folder-size-analyzer ~
# Scan with depth 2, show top 10
folder-size-analyzer /Users -d 2 -n 10
# Deep dive into Library
folder-size-analyzer ~/Library -d 3 -n 15
This is the kind of tool I actually use. It started as a quick script to deal with a full disk during an incident, got polished into something shareable. Good scripting discipline means writing things others can use too.