Analyze disk usage with Baobab

Cleanup

© Lead Image © Amy Walters, 123RF.com

© Lead Image © Amy Walters, 123RF.com

Author(s):

Unnecessary files and directories take up valuable space on hard disks or SSDs. Baobab lets you locate and remove data garbage at the push of a button.

Computer mass storage is getting bigger and cheaper. With the rapidly increasing capacity of hard disks, SSDs, and USB sticks, users are tempted to store even more information (with some of it soon forgotten).

To find your way through the data jungle, Linux offers command-line tools like du or df. However, these tools do not provide detailed information on where data is stored or which files are the biggest space hogs.

Baobab [1], also known as Disk Usage Analyzer, is a graphical, menu-driven viewer, which lets you quickly track down obsolete data and identify space hogs. Baobab also lets you remove useless files without requiring massive search overhead.

You can find Baobab in the package sources of virtually all popular Linux distributions. It is easy to install using your distribution's package management tools. Some distributions, such as Ubuntu, automatically install Baobab.

Although the tool works with the GTK+ toolkit, Baobab also works with GTK desktops other than Gnome. After installation, the tool will appear in your desktop's menu hierarchy as Disk Usage Analyzer.

Windows

When launched, Baobab opens the Devices & Locations window, which shows all the drives available on your system, regardless of their mount status. Here you can see a drive's size and capacity to the right of the drive designation, as well as a colored bar beneath that shows total drive utilization at a glance (Figure 1).

Figure 1: When launched, Baobab shows you all the drives available on the system with their utilization levels.

Clicking on a displayed drive opens a two-paned window that shows the selected drive's directory hierarchy in a tree structure on the left. Baobab again uses colored bars to indicate utilization, which ranges from red (almost full) to yellow (partially full) to green (almost empty). If a small triangle appears in front of the directory name, clicking on it expands the view to the next hierarchy level. To the right of the directory tree structure and utilization bar graphs, you will find each level's absolute size and the number of objects it contains.

In the right pane, the drive's space allocation is shown as a multilayer pie chart, with each layer representing a further hierarchy level. If you mouse over the pie chart, Baobab temporarily displays the corresponding subdirectories and the occupied storage capacity (Figure 2).

Figure 2: Directories with the largest amounts of data can be located quickly.

If you click on another directory in the tree view on the left, the view also changes in the right window segment. Using the two buttons at the bottom of the right pane, you can switch from a pie chart (the button on the left) to a tile graph (button on the right). If the view appears too detailed (or too general for complex hierarchies), you can also use the context menu to zoom in or out.

Administration

Baobab not only provides insight into the data carriers' structure and assignments, but it also supports basic administrative tasks. When you right-click on a desired directory in the right pane, a context menu pops up that allows you to open the current working directory in the desktop's file manager, letting you work with its data. Alternatively, you can move a selected directory (including all its subdirectories) directly from Baobab to the trash can.

The left tree view also provides administrative task functions via a context menu, which you open by right-clicking on the desired directory. However, the only options available from this pane are for saving the file path to the clipboard, moving the directory with its subdirectories to the trash can, or opening the folder.

On computers with large volumes of data stored in deeply nested structures, it makes sense to work with individual folders. To do this, click on the Scan Folder… option (located under the hamburger icon drop-down list in the top-right corner of the drive view) and then select the desired folder in the file manager. After closing the dialog, Baobab displays the folder contents in the usual way, with the selected folder appearing as the root directory in the tree structure.

Removed

In addition to scanning locally mounted media, Baobab also supports media analysis and data cleanups on remote computers. To connect to an external computer, select Other Locations located bottom left in the Select Folder dialog box (Figure 3).

Figure 3: Baobab can also remove obsolete data from remote systems.

The file manager now displays other systems found on the local network. You can connect to the remote computer by clicking on its icon; if this does not work, enter the server address in the input field in the bottom right corner.

After pressing Connect, Baobab opens the corresponding connection. The software then switches back to the main window and displays the contents of the remote computer or server, which can be used just like local files and directories.

Conclusions

Baobab brings order to chaotic file and directory structures on mass storage media. If you run out of disk space, Baobab helps you quickly find the biggest storage hogs and move them directly to the trash can, bypassing the command line. The tool impresses with its ease of operation, good overview, and option to work on remote systems.