Introduction to Dust
Dust is a tool that is designed to give users a more intuitive way to understand where their disk space is being used. It’s a combination of the classic disk usage command "du" and the Rust programming language, hence the name "dust." Dust aims to provide a clearer and more visually intuitive experience compared to traditional tools.
Purpose
The primary purpose of Dust is to offer users an easy way to identify the directories and files that are consuming significant disk space. Whether you are managing a large server or checking your computer for unnecessary files, Dust can help you efficiently pinpoint the biggest space users.
Key Features
- Intuitive Output: Dust provides an easy-to-read display without needing to use additional commands like sort or head to make sense of your disk space usage.
- Maximized Screen Real Estate: It smartly uses the terminal height to display the most relevant directories and files, ensuring you see the most critical information first.
- Color-coded Visualization: Dust uses color bars to visually represent disk usage in the file hierarchy. Shades of gray are used to indicate which parent folder a subfolder belongs to.
- Simplified Commands: Unlike other tools, Dust doesn’t require complex flags to function. For instance, the largest folders are highlighted without needing to add a '-d' or '-h' flag.
Installation
Dust provides a variety of installation options to suit different operating systems:
- Cargo: For Rust users, simply run
cargo install du-dust
. - Homebrew: Available on both MacOS and Linux with
brew install dust
. - Snap: Installable on Ubuntu and other supported systems using
snap install dust
. - Windows: For Windows users, use
scoop install dust
. - Other Methods: It can also be installed via Anaconda, Pacstall, deb-get, and x-cmd.
Usage
Dust offers a simple usage syntax:
- Just type
dust
to get an overview of disk usage. - Target specific directories by typing
dust <dir>
. - Several flags are available to customize the output according to your specific needs, whether you want to display full paths, show only directories or files, reverse the output order, or control color usage.
For example, to only show directories, use dust -D
. To display information for files larger than a certain size, use dust -z <size>
.
Customization
Dust allows for customization through a config file located at ~/.config/dust/config.toml
or ~/.dust.toml
. Users can set default options that Dust will adhere to every time it runs.
Alternatives
While there are several disk usage tools available, such as NCDU, dutree, and dua, Dust stands out with its intuitive visual representation and ease of use. It offers a slightly different approach to disk usage calculation compared to other tools like gdu, particularly in handling hard links.
Dust is a powerful tool for anyone looking to manage disk space efficiently, combining simplicity with powerful functionality to meet the needs of a wide range of users.