Skip to content

TheOldZoom/gofs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gofs

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.

What you get

  • 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

Install

Option 1: Download from Releases

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-amd64

Option 2: Install to ~/.local/bin

This installs the latest matching release as ~/.local/bin/gofs:

curl -fsSL https://raw.githubusercontent.com/theoldzoom/gofs/master/install.sh | sh

If ~/.local/bin is already in your PATH, you can then run:

gofs

Option 3: Build from source

You need Go installed.

git clone https://github.com/theoldzoom/gofs.git
cd gofs
go build -o build/gofs .
./build/gofs

Usage

Show the current directory summary

gofs

Example formatted output:

40.0 KB  .
25.6 KB  .git
3.3 KB   cmd
1.0 KB   .github

Check another directory

gofs ~/Downloads
gofs /path/to/directory

What it shows

  • The total size of the target directory
  • The size of each immediate child directory
  • Results sorted from largest to smallest

Help

gofs --help

Available flags:

  • --help - show command help

Notes

  • 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

Project structure

.
├── 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

Tech stack


Contributing

Contributions are welcome.

git clone https://github.com/theoldzoom/gofs.git
cd gofs
go test ./...
go build -o build/gofs .
./build/gofs

Before opening a PR:

  • Keep changes focused
  • Run go test ./...
  • Run go build -o build/gofs .
  • Follow the existing project style

License

MIT. See LICENSE.

About

A small terminal CLI for checking the size of a directory and its immediate subdirectories.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors