| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
One script that answers "where did my 250 GB go?". It scans a directory recursively, prints the largest subdirectories to the console and writes an interactive HTML treemap: rectangle area equals disk usage, click to drill down.
Works on Windows 11, Linux and macOS with CPython >= 3.7.
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtpython dirtree.py . # current directory
python dirtree.py C:\ # whole drive (Windows)
python dirtree.py / -x # root filesystem (Linux/macOS)
python dirtree.py C:\ --min-mb 500 # hide clutter below 500 MB
python dirtree.py /var --no-browser # just write the HTMLExample output:
Scanning: /home/user/projects
This may take a little while on large drives...
Total: 42.0 MB
Directories scanned: 5
Largest directories:
----------------------------------------------------------------------
30.0 MB big
12.0 MB nested/deep
12.0 MB nested
4.0 KB small
Interactive map written to:
/home/user/projects/dirtree.html
| Option | Default | Meaning |
|---|---|---|
| path | . | directory to scan |
| --min-mb | 10 | hide directories below this size in the treemap |
| -x, --one-filesystem | off | do not cross mount points / drive boundaries (like du -x) |
| --top | 25 | how many directories to list on the console |
| --output | dirtree.html | HTML output file |
| --no-browser | off | do not open the result in a browser |
GPLv3 (c) 2026 mail@marcelpetrick.it
Contributions welcome!
| Back | FazBrowse Home | New Git URL |