In the next article we are going to take a look at diskonaut. This is un disk space browser that we will use from the terminal. It's simple and built with Rust, plus it's compatible with Gnu / Linux and macOS. To use it, we will only have to specify an absolute path in the file system, or execute it in the directory that interests us. The program will scan it and index the metadata in memory so that we can explore its content. In addition, it will also allow us to inspect the use of space even while performing the scanning process.
When the scan is complete, we will be able to navigate through the subdirectories, obtaining a visual representation of a tree map of what is consuming the disk space. In addition, the program will also allow us to delete files and directories, making diskonaut keep track of the amount of space it has freed up in the process. It also supports keyboard shortcuts for easier navigation.
In the following lines we will see how we can install and use diskonaut in Ubuntu.
Install diskonaut on Ubuntu
To install and use diskonaut, it will be necessary to have the Rust programming language installed in our system. Rust is a programming language that is relatively new. It promises to create fast and secure applications. It is developed in a totally open way and seeks the opinion and contribution of the community.
The main objective of Rust is to be a good language for creating great programs, on the client and server side, that run on the Internet. This placed special emphasis on security and memory distribution control. The syntax of this language is similar to that of C and C ++, with code blocks delimited by braces and flow control structures such as if, else, do, while, and for.
According to its developers it has been designed to be a safe and practical language. It supports pure functional, procedural, imperative, and object-oriented programming.
If you still do not have this language installed on your system, you can consult an article that was published in this blog a while ago, or you can also open a terminal (Ctrl + Alt + T) and install it using the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Once we finish the installation and our system has Rust installed, we should have a position in the system. This is the Rust package manager. In order to use it, it will be interesting to read the instructions that will appear in the terminal. When everything is available, we can already use charge for install diskonaut on the system. In the same terminal, we can use the command:
cargo install diskonaut
Start diskonaut
Once diskonaut is installed, ya we can start it in the directory that we want to analyze. We can also specify an absolute path as an argument of any directory that we want to analyze:
cd /home/usuario diskonaut
Or we can also use the command in the following way:
diskonaut /home/usuario
Once the program starts, we will see that at the bottom we will be able to check available keyboard shortcuts for convenient and efficient use with diskonaut.
When the scan is complete, or before finishing, we will be able to select a subdirectory, and press the Enter key to explore it.
As I mentioned before, diskonaut is a terminal user interface that draws a visual map of our disk space, which will also allow us to navigate through subfolders and delete files or folders that take up too much space. Since it is a terminal application, also can be useful to run directly on servers (for example, to clean logs, temporary files, dockable volumes, or just to get a visual representation of your disk utilization).
More information about this program can be found at diskonaut repository at Github. If any user wants to contribute to diskonaut, they can do so in various ways, and according to its creator, any contribution will be greatly appreciated. If you are interested, you can consult the section on the matter from the page at GitHub of the project.