Dutree is a free and open source command line tool used for displaying the output of disk space utilization in a colored format. It is written in RUST programming language and combines Durep – Disk Space Reporter and tree which is another CLI tool which displays content in directories in a tree-like format. In this article , we’ll show you how to install Dutree in your Linux system.
Features of Dutree
Here are some of the uses of Dtree.
- It displays the file system tree in a hierarchy manner
- It allows the user to add minimal files
- You can exclude directories or files
- It allows the uUser to make a comparison of different directories
How to install Dutree in Lunux systems
First , install curl , which is a command line tool for transferring data in URL syntax
In CentOS & RHEL 7
yum install curl
In Ubuntu 18.04 & Debian 7
apt install curl
Next, Install RUST
curl https://sh.rustup.rs -sSf | sh
Sample Output
info: downloading installer Welcome to Rust! This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. It will add the cargo, rustc, rustup and other commands to Cargo's bin directory, located at: /root/.cargo/bin This path will then be added to your PATH environment variable by modifying the profile files located at: /root/.profile /root/.bash_profile
Thereafter, clone the Dutree git repository. To install git,
In CentOS & RHEL 7
yum install git
In Ubuntu 18.04 & Debian 7
apt install git
Once git installation is successful, clone Dutree git repository
git clone https://github.com/nachoparker/dutree.git
Sample Output
Cloning into 'dutree'... remote: Counting objects: 72, done. remote: Compressing objects: 100% (43/43), done. remote: Total 72 (delta 30), reused 60 (delta 22), pack-reused 0 Unpacking objects: 100% (72/72), done.
Next, we’ll set up RUST environment
Setting Up RUST environment
Run the following commands
source $HOME/.cargo/env
To verify RUST version
rustc --version
Output
rustc 1.25.0 (84203cac6 2018-03-25)
Install Dutree using cargo
cargo install dutree
To navigate to Dutree help page run
dutree -h
Run Dutree command. This displays disk usage in a hierarchical colored format.
dutree
To give a summmary of disk usage
dutree -dl
To display ASCII characters
dutree -A
Conclusion
Summing up, we have outlined the steps on How to install Dutree. nFeel free to try out the commands and tell us what you think. Thank you.