You may own a one terabyte hard disk, but the screen still shows an “Your disk is full” error message whenever you want to install a new application. Does this sound familiar to you?
When I shop for hard disk, I tend to buy one that comes with a large storage space so that I can have ample space to store all my video and music files and to install (and test out) all sort of applications to my system. However, one thing that I found is that no matter how big my hard disk is, it will get depleted very fast. If you are just like me, then it’s time for you to get familiar with some disk usage analyzers to view disk usage on Linux and see what you have been storing on your hard disk. Then you can get it removed to retrieve the storage space.
Below are some of the ways and tools to view disk usage on Linux.
If you are geeky enough, the easiest and fastest way is to use the ‘df’ command in your terminal. Simply type
in the terminal and it will show the disk usage percentage of your hard disk.
As can be seen from the screenshot above, this can only serve as a quick way to find out the amount of disk space available. It is definitely not the best mean to analyze your storage pattern.
Baobab (Disk Usage Analyzer)
Most Linux distros with Gnome desktop (especially Ubuntu) use Baobab, also known as Disk Usage Analyzer, as the default disk usage viewer application. This is a great application that can break down and analyze your storage pattern to the last folder. You can define the folders that you want to scan and get it to return a circular rings chart representation of the space taken up by each files.
KDirStat and GdMap
If you have used WinDirStat on your Windows, you will agree that it is an useful application that can help you analyze and reclaim your disk space. What many people don’t know is that WinDirStat is actually a clone of the KDirStat. KDirStat has the same functionality as WinDirStat (or maybe the other way round), except that it is meant for the Linux desktop. While it is initially designed for KDE desktop, it is also compatible with any X11 desktop system.
KDirStat displays your folders/files in term of rectangular chunk. The biggest the filesize, the bigger is the chunk. This allows you to have a quick view of your filesystem and easily identify which folders/files is taking up a big chunk of space in the hard disk.
Gd Map is the KDirStat equivalent in Gnome desktop, except that it does not display the folder structure above the treemap and does not allows you to clean up the hard disk.
Like Baobab, Filelight creates an interactive map of concentric, segmented rings that help visualize disk usage on your computer. You can easily zoom in to any folders by clicking on the respective segment on the rings.
Philesight is a Web-based implementation of Filelight and can be used on a remote server without graphical user interface. Philesight uses a command line program to generate the PNG files on your browser and a wrapper CGI script to allow navigating through the filesystem. One of its distinct feature is the colorful rainbow concentric rings that makes it pleasant to look at.
xdiskusage is a tiny program that displays your filesystem hierarchy from left to right with a rectangular shape of size respective to its file size. If you are scanning your Home folder, The left most rectangular box will represent the Home folder while the subsequent boxes to the right represent the next folders down the Home directory. You can easily zoom in/out of any folders (or rectangular box) by double-clicking on that box.
What is the software that you used to analyze and view the disk usage pattern on your Linux desktop?
More articles about: