/disktree

It is a CLI that displays the file size according to directory structure.

Primary LanguageGoMIT LicenseMIT

Disk Tree

Github Actions

Disk Tree is a CLI that displays the file size according to the directory structure, like the tree command.

screenshot

Installation

Install using homebrew:

brew install xkumiyu/tap/disktree

If you want to use the HEAD, you can do the following:

go get github.com/xkumiyu/disktree/cmd/dtree

Usage

You can use dtree command.

dtree [OPTIONS] PATH

Options

  • -L, --max-depth INT: show only to max-depth
  • -s, --sort STRING: select sort: name(default), size, and files
  • --min-size STRING: show only files/dirs larger than min-size
  • --color STRING: set the colorization: auto(default), always, and never

Example

dtree -L 2 -s size -min-size 1M ~/

Comparison

The processing time when running in a large directory (>1M files) is as follows:

command time
dtree 45.6s +/- 4.8s
tree -a -s 117.2s +/- 3.8s