A small terminal CLI for checking the size of a directory and its immediate subdirectories. It prints human-readable totals, sorts them from largest to smallest, and works well for quick terminal inspection.
- Check the current directory with no arguments
- Inspect any directory path from the command line
- Human-readable output for quick inspection
- Recursive directory totals so nested files are included
- No config required
Open Releases and download the file for your system:
| I use... | Download this file |
|---|---|
| Linux (x86_64) | gofs-linux-amd64 |
| Linux (ARM64) | gofs-linux-arm64 |
| macOS (Intel) | gofs-darwin-amd64 |
| macOS (Apple Silicon) | gofs-darwin-arm64 |
Then make it executable and run it:
chmod +x gofs-linux-amd64
./gofs-linux-amd64This installs the latest matching release as ~/.local/bin/gofs:
curl -fsSL https://raw.githubusercontent.com/theoldzoom/gofs/master/install.sh | shIf ~/.local/bin is already in your PATH, you can then run:
gofsYou need Go installed.
git clone https://github.com/theoldzoom/gofs.git
cd gofs
go build -o build/gofs .
./build/gofsgofsExample formatted output:
40.0 KB .
25.6 KB .git
3.3 KB cmd
1.0 KB .github
gofs ~/Downloads
gofs /path/to/directory- The total size of the target directory
- The size of each immediate child directory
- Results sorted from largest to smallest
gofs --helpAvailable flags:
--help- show command help
- Sizes are calculated recursively
- Files inside the target directory count toward the total
- Only directories are listed as separate rows
- The tool is useful for quick disk-usage checks without a heavier UI
.
├── cmd/ # Cobra CLI entrypoint
├── .github/workflows/ # Release automation
├── makefile # Build and release targets
├── install.sh # Install latest release to ~/.local/bin
├── main.go
├── go.mod
├── go.sum
└── LICENSE
Contributions are welcome.
git clone https://github.com/theoldzoom/gofs.git
cd gofs
go test ./...
go build -o build/gofs .
./build/gofsBefore opening a PR:
- Keep changes focused
- Run
go test ./... - Run
go build -o build/gofs . - Follow the existing project style
MIT. See LICENSE.