2021年7月12日月曜日

CentOS 8/CentOS 8-Streamにフォルダ毎のディスク使用量を分かりやすく表示できるdustコマンドをインストールする

フォルダ毎のディスク使用量を分かりやすく表示できるdustコマンドをインストールするには、以下のコマンドを実行します。

インストール手順

1. Rust言語のインストール
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
※以下の様な選択肢が表示されたら1を入力します
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
インストールしたシェルですぐにRustを使用するために、以下のコマンドを実行します。
source $HOME/.cargo/env

2. dustコマンドのインストール
cargo install du-dust

3. dustコマンドの実行
以下のコマンドを実行して、フォルダ毎の容量を表示する事ができます。
dust

〇dustコマンドの実行例(CentOS 8)

〇dustコマンドの実行例(CentOS 8-Stream)

トラブルシューティング

以下の様なエラーがでたら、
error: linker `cc` not found
以下のコマンドを実行してgccをインストールします
sudo dnf -y install gcc

関連情報

・dustコマンドのgithubリポジトリ
https://github.com/bootandy/dust

0 件のコメント:

コメントを投稿