projects / diskmap

Diskmap

Live

Fast terminal disk space analyzer detects drives, maps top-level folders, or drills into any path as a tree.

overview

A terminal tool for finding what's eating your disk. Drop the binary anywhere, run it, and in a few seconds you have a sorted list of everything on a drive — or a tree of any directory you point it at.

Why I built it

I kept running du -sh /* and squinting at the output. I wanted something that detected my drives automatically, showed me proportional bars for quick scanning, and could also drill into a specific folder as a proper tree. Nothing I found did exactly that without a GUI or a pile of dependencies.

How it works

Written in Go — compiles to a single static binary with no runtime dependencies. On Linux it parses /proc/mounts to detect real block devices and filters out pseudo-filesystems. On Windows it probes drive letters A–Z. Scanning runs concurrently: 8 goroutines measure directories in parallel, with a live spinner so you know it hasn't frozen.

Two modes depending on your input: press Enter to get a top-level flat view with proportional bar charts, or type a path to get a recursive tree with configurable depth (1–5). Permission errors are silently skipped — it never crashes on access denied.

Output

Sizes are colour-coded by magnitude — red for 10 GB+, orange for 1 GB+, yellow for 100 MB+. Your eyes find the problem directories in under a second.

Build it yourself

# Linux
go build -o diskmap .

# Cross-compile for Windows from Linux
GOOS=windows GOARCH=amd64 go build -o diskmap.exe .