Find out where your disk space is going in seconds.
$ dux /var
4.0KiB /var/empty
52.0KiB /var/mail
1.2MiB /var/backups
23.4MiB /var/cache
156.8MiB /var/lib
512.3MiB /var/logdux shows you the size of each subdirectory, sorted smallest to largest. Use it to:
- Find space hogs - Quickly identify which directories are consuming disk space
- Plan cleanup - See at a glance what to delete or archive
- Monitor growth - Check which directories are growing over time
One-liner (user install):
git clone https://github.com/Open-Technology-Foundation/dux.git && cd dux && ./install.shOne-liner (system-wide):
git clone https://github.com/Open-Technology-Foundation/dux.git && cd dux && sudo ./install.shThe installer sets up:
duxcommand (symlink todir-sizes)- Bash completion
- Man page (
man dux)
To uninstall: ./install.sh --uninstall
dux [OPTIONS] [DIRECTORY]| Option | Description |
|---|---|
-L |
Follow symlinks |
-q, --quiet |
Suppress permission errors |
-h, --help |
Show help |
-V, --version |
Show version |
Where is my disk space going?
dux ~ # Check home directory
dux / # Check entire filesystem (may need sudo)Find the largest directories:
dux /var | tail -5 # Show 5 largest in /var
sudo dux / | tail -10 # Show 10 largest on systemCheck a project for bloat:
dux ~/projects/myapp # Find large folders in projectPipe to other tools:
dux . | grep -v node_modules # Exclude node_modules
dux /home | tee sizes.txt # Save output to fileFollow symlinks:
dux -L /opt/myapp # Include symlinked directories<size> <path>
- Sizes use IEC units: B, KiB, MiB, GiB, TiB
- Output is tab-separated (easy to parse with
cut,awk) - Sorted smallest to largest (largest at bottom for visibility)
Permission errors appear on stderr but don't stop execution:
dux /var # Shows errors inline
dux -q /var # Suppress errors with --quiet
sudo dux /var # Full access to all directories| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (invalid directory, failed to read) |
| 2 | Too many arguments |
| 22 | Invalid option |
- Bash 5.2+
- GNU coreutils (du, sort, numfmt)
| dux | du -h | ncdu | dust | |
|---|---|---|---|---|
| Sorted output | Yes | No* | Yes | Yes |
| Human-readable | Yes | Yes | Yes | Yes |
| One command | Yes | No* | Yes | Yes |
| Interactive | No | No | Yes | No |
| Dependencies | coreutils | coreutils | ncurses | Rust |
*du requires piping through sort -h for sorted human-readable output
dux fills the gap between raw du output and full-featured tools like ncdu. It's the quick answer to "what's using my disk space?" without installing additional software.
GPL-3.0 - See LICENSE
- ncdu - Interactive disk usage analyzer
- dust - du + rust = dust
- BASH Coding Standard - Coding standard used by this project