dist

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 1 Imported by: 0

README

dist

DIrectory STats: a small CLI that scans a directory tree and reports how many files, directories, and total items it contains, along with the total size of those files. Counts are always fully recursive; --depth controls how many levels of per-subdirectory breakdown are displayed.

Install

With Go:

go install github.com/markosnarinian/dist@latest

Or download a pre-built binary for your platform from the releases page.

Usage

dist [directory] [flags]

With no arguments, dist scans the current directory and prints a summary:

$ dist
PATH  FILES  DIRS  TOTAL      SIZE
.        42     7     49  1.2 MiB

Use --depth (-d) to also show stats for subdirectories down to the given number of levels:

$ dist -d 2 myproject
PATH             FILES  DIRS  TOTAL       SIZE
myproject           42     7     49    1.2 MiB
├── cmd              3     0      3   12.4 KiB
├── internal        12     2     14  980.0 KiB
│   ├── scan         8     0      8  612.3 KiB
│   └── render       4     0      4  367.7 KiB
└── docs             5     1      6   28.1 KiB
Flags
Flag Description
-d, --depth Levels of subdirectory stats to display (0 = root summary only)
-h, --help Show help

Notes:

  • Symlinks are not followed; a symlink counts as a file even if it points to a directory.
  • SIZE is the sum of file sizes (directory entries themselves are not counted) and is shown in binary (1024-based) units.
  • Unreadable directories are skipped with a warning on stderr.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL