Raspberry Pi

Get Disk Space Information on Raspberry Pi Using Dust

dust is an open-source command-line tool used by Linux users to analyze the disk space on their system. The Raspberry Pi users can also install this application to find out the space available on their disk, which helps them free up and manage the storage.

The dust is an alternative to the most commonly used du command; however, it’s better than the du command as it gives you an overview of the disk space of each directory on your system in percentage.

This tutorial presents a detailed guideline for installing dust on your Raspberry Pi device so you can have a clear overview of disk space on your device.

Install dust on Raspberry Pi

The dust utility doesn’t come from the official sources of Raspberry Pi; thus, you cannot directly install it on your device. However, using the following steps, you can install this application within a few minutes.

Step 1: Download dust on Raspberry Pi

First, download the latest version of dust on your Raspberry Pi device by applying the below-given command:

$ wget https://github.com/bootandy/dust/releases/download/v0.8.1/dust-v0.8.1-aarch64-unknown-linux-gnu.tar.gz

Make sure that you are using the 64-Bit OS version on your Raspberry Pi device as the above command will only work on this version. To download the dust 32-Bit version of the utility, visit GitHub website.

Step 2: Make a Temporary Directory on Raspberry Pi

After downloading the dust tar.gz file, you need to make a temporary directory with the name “dust-temp” using the following command:

$ mkdir dust-temp

Inside the above-created directory, we will put the contents of the dust tar.gz file using the following command:

$ tar xf dust-v0.8.1-aarch64-unknown-linux-gnu.tar.gz --strip-components=1 -C dust-temp

Step 3: Move Directory to the Local Bin Directory

Next, you will need to move the directory “dust-temp” to the location “usr/local/bin” using the following command:

$ sudo mv dust-temp/dust /usr/local/bin

Step 4: Run dust on Raspberry Pi

With the above changes successfully made, you can then run the following command to find out the disk information of your device:

$ dust

You can also use the following command to find out the disk information of your directory:

$ dust ./<Directory name>

Removing dust From Raspberry Pi

If you don’t want to use dust services on your Raspberry Pi device, then executing the following command will remove the dust from your device:

$ sudo rm -rf /usr/local/bin/dust

Conclusion

dust is a lightweight tool for finding out the disk information on your Raspberry Pi device. It’s a better option than the “du” command because of its clear overview of disk space with the percentage sign. You can install this tool on your Raspberry Pi device by downloading its tar.gz file from GitHub. After the successful installation, you can use the “dust” command with the directory location to get the disk space information on your Raspberry Pi terminal.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.