M.2 Solid State Drives

dutree – reclaim precious hard disk space

Last Updated on September 1, 2020

You often hear that disk space is cheap and plentiful. And it’s true that a 4TB mechanical hard disk drive currently retails for less than 100 dollars. But like many users I’ve migrated to running Linux on M.2 Solid State Drives (SSDs). They are NVMe drives reaching read and write speeds of over 5,000MB/s. That’s over 20 times faster than a 7,200 RPM traditional hard drive.

M.2 SSDs do functionally everything a hard drive does, but help to make a computer feel far more responsive. M.2 are NVMe drives which reduce I/O overhead and brings various performance improvements relative to previous logical-device interfaces, including multiple long command queues, and reduced latency. M.2 drives are more expensive than mechanical hard drives in terms of dollar per gigabyte. And M.2 with really large capacities are thin on the ground and expensive, so most users settle for lower capacity drives.

Whatever the size of the hard disk, my disks always fill up over time; it seems data expands to fill any void. This is partly because I experiment with lots of distributions and software. But hard disks always seem to fill up by themselves. Whether you use M.2, other type of SSD, or mechanical hard disk drives, you cannot afford to be rash with storage. When a hard disk is full, it can be very time consuming to sort out and remove offending files and directories.

Linux distributions come supplied with utilities to explore disk usage. For example, du is a standard tool used to estimate file space usage; space being used under a particular directory or files on a file system.

du shows directories which are taking up space. And you can combine du with other command-line utilities such as grep and sort to make the output more meaningful. But there are many alternatives.

dutree is a command line tool to analyze disk usage. It’s name derives from Durep and Tree.

The software is written in the Rust programming language. If you’re looking to learn more about Rust, we’ve compiled the finest free books and tutorials for this language.

dutree is free and open source software.

Installation

It’s Linux, so there’s multiple ways to install this utility. As my main distro is Arch, I usually gravitate towards the Arch User Repository (AUR) when installing packages. And there’s a package in AUR for dutree. For other distributions, there may be a simple package to install. But I haven’t done any investigation in this respect.

You can also install the software with cargo, Rust’s package manager with the command “cargo install dutree” at a shell. Cargo makes it easy to get up and running by downloading a Rust project’s dependencies, compiling the project, making packages, and more.

Next page: Page 2 – In Operation

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Vernon Tillerson
Vernon Tillerson
4 years ago

“my disks always fill up over time”

Shall I let you into a secret? Your disks are filling up at an even FASTER rate when installing all of these new rust language programs to replace the equivalent functionality of standard C/C++ programs.

Old fashioned tux commander binary (and tuxcmd functionality can be expanded with various plugins) has a size of 1,8 Mbyte. The size of dutree is over 8 times that at 15 Mbyte.

01101001b
01101001b
4 years ago

“we found the software was very slow […] compared to say ncdu”

Well, you took the words right out of my mouth. Yep, bloated too.

Bear
Bear
4 years ago

The size of the binary dutree is 1.5MB not 15MB. It’s not bloated. Disks fill up not because users have installed a few Rust programs but because of things like design decisions taken by distributions, end users forgetting they have downloaded huge files, software that use huge disk caches etc.