Linuxメモ : Rust製のdutreeコマンドでディスク使用量を可視化
dutree
Rust製のdutreeコマンドを使うと図のようにディスク使用量を可視化できる。

インストール
各環境でのインストール方法はこのページに書いてある。
バイナリはこのページからダウンロードでき、 Rust製なのでcargo installでインストールできる。
$ cargo install dutree
ヘルプメッセージ。
$ dutree --version
dutree version v0.2.9
$ dutree --help
Usage: dutree [options] <path> [<path>..]
Options:
-d, --depth [DEPTH] show directories up to depth N (def 1)
-a, --aggr [N[KMG]] aggregate smaller than N B/KiB/MiB/GiB (def 1M)
-s, --summary equivalent to -da, or -d1 -a1M
-u, --usage report real disk usage instead of file size
-b, --bytes print sizes in bytes
-f, --files-only skip directories for a fast local overview
-x, --exclude NAME exclude matching files or directories
-H, --no-hidden exclude hidden files
-A, --ascii ASCII characters only, no colors
-h, --help show help
-v, --version print version number
使い方
dutreeコマンドを実行するとカレントディレクトリ以下に対しての結果が表示される。
例えば以下のようなディレクトリ構成で、

dutreeコマンドを実行した結果が下図。

-sオプションを指定すると概要を確認できる。

もし表示に問題がある場合は-Aオプションで#文字を使っての表示に切り替えらえれる。
