I live a fair amount of my life in the terminal and I like it there. Whenever there is a new utility, that does a job in a more delightful manner, I get all excited, for example bpytop. That gave me a new way to do system monitoring in the terminal that surpassed anything I had used at that time.
Now it’s time to make disk listings a new level of sensational in how it is exhibited. The df command is great, it does the job and tells you want you want but dysk is something special.
Installation
Since I am an openSUSE user, adding this utility is as easy as typing this in the terminal:
sudo zypper install dysk

Interestingly, no additional dependent packages were required. Looking through the list, what it requires all comes from glibc, gcc and ld-linux. Everything else is bundled in it. What a nice neat little package!
Usage
At the very basic level, you can just type, dysk in the terminal and get this fantastic output.

Not only is this telling me where the filesystem exists but also the type of file system, the kind of disk, how much is used, a nice little graphic with a percentage along with a report of how much is free and the total size of the device as well as where it is mounted. This utility is absolutely fantastic and very easy to understand at a glance.
The stand out feature here that was not previously available to me is the disk column. Here are the options, according to the dgreatocumentation on dysk.
remov: a removable device (such as an USB key)HDD: a rotational diskSSD: a solid state storage deviceRAM: an in-memory device (such as zram)LVM: a device mapped to one or several disks using LVMcrypt: a crypted disk
Another nice column to have is the type column. This is great because it will tell you the the filesystem type, like btrfs, xfs, ext4, tempfs or vfat and others. The other tools don’t tell you that by default.
This is pretty fantastic because I have been previously annoyed by the additional number of hoops necessary to just get that information. Such a nice quality of life improvement.
Another great feature is that by default, dysk strips out all the snaps I have installed too. For comparison, here is lsblk

and also df with the -h option.
You can get similar output from dysk by using the -a option
It’s still cleaner looking, thanks to the the table layout, but not as nice as the default option that strips out the extra bits. This is obviously filtered by “type.”
Some other cool features that are more important for those that want to do something with the information is the –json option.
great
Another neat addition, is the ability to filter things out. So, for instance, lets say I want to see how many SquashFS type of disks I have attached for auditing Snaps. Here is how I could do that.
dysk -af type=squashfs

Conveniently, if you want to add other parameters, it can be done super easily. For example, lets say I want to see how many SquashFS types use more than 100M of storage.
dysk -af 'type=squashfs & used > 100M'

From here, it’s at the limits of your imagination of how useful you can make this utility.
Table Features
More information can be found here but in short, you can add more tables of information. By default you see what I have been showing but you can also add columns of additional information. Like labels, device ID and if it is a remote file system (super handy). This is accomplished by “adding” together these options.
dysk -c default+label
This will add the label at the end of the default table.

You can change the order to what you like and show how much you want to see by using this as well.
dysk -c id+filesystem+label+disk+use+mount

This allows you to view only what you want to view or if you want to view more than the default, change the order, etc, it’s all there.
Final Thoughts
This utility, dysk, should be moved into one of those automatically installed applications on Linux distributions. This works so fantastically well, makes terminal life a lot better and is extremely friendly to use. I am so happy that someone recommended that I check this out on Linux Saloon. A great terminal application is always a welcome addition to my computer. There is something fun and almost “retro” about using the terminal that when I get new toys, I am extremely excited.
References
https://dystroy.org/dysk
Bpytop on openSUSE | Terminal

Leave a Reply