Picture your disk space with 3-D filesystem browsers

229

Author: Nathan Willis

You don’t need a Ph.D. in scientific visualization to have some fun with three-dimensional data. Whether you’re searching for an unused nook in a cramped disk partition, or trying to find the bloated temp/ folder that’s crashing your system, sometimes the flat folder view of a traditional GUI file browser is little help. Luckily, Linux offers a variety of 3-D filesystem that can make your disk usage statistics come alive.

FSV – click to enlarge

Take File System Visualizer (FSV), for instance. When you launch FSV, the view port brings up a 3-D palette representing the current working directory.

The top surface of the directory is filled with smaller blocks depicting all of the items inside — files, directories, even symbolic links — and each block is scaled to show proportionally how much space it takes up out of the whole. That’s real handy if you’ve been using the same hard drive for years, and forget how much space all those term papers you bought for your college Ethics class are eating up.

You can navigate around your entire filesystem with the tree view on the left side, but be careful — whenever you switch directories, FSV has to calculate the sizes for your new location. If you go all the way to /, it could take a while.

The down side to FSV’s file-size-equals-physical-size approach is that small files are very hard to see. Moreover, in a directory that contains a large number of files, all the files end up looking small.

3DFM – click to enlarge

The cure for that ill is to use a different application called 3DFM. 3DFM lets you fly through your files like a network: each directory has lines linking it to its contents and its parent directory. The contents of each directory are splayed out in a concentric ring emanating from the folder’s icon, so the topology of your filesystem looks like a monster spiderweb, or a Fantastic Voyage array of neurons. Using this approach, it’s much easier to find directories that are littered with too many files.

Taking a very different approach indeed is XCruiser (formerly known as XCruise). XCruiser renders each directory like a solar system; the files orbit around a “star” like planets — though each planet can, of course, have its own satellites orbiting it, ad infinitum.

The hierarchy of directories orbiting directories shares some of 3DFM’s approach, but since the size of each orbiting file correlates to its file size, you get some of the benefits of FSV’s approach, too.

I’d hesitate to call XCruiser the best of both worlds, though, since the resulting structure is complex to look at, and you can get lost in it pretty easily. Furthermore, the app extends the “outer space” metaphor to include how you browse the system; you have forward and reverse controls and fly around as if you’re in a spaceship. Fun, maybe, but far from easy to use.

Old code

If you visit any of these projects’ home pages, you will notice that they are a few years old. It’s sad, but the heyday of 3-D file browsing on Linux is over. Nonetheless, all three will compile on a modern Linux system without much trouble.

XCruiser – click to enlarge

A couple of cautionary notes are in order, though. First, I had trouble getting XCruiser to compile because I had to figure out its dependencies from the error messages, and even now I’m not sure I got them all, because sometimes the program misinterprets my keystrokes and sends me zooming out of the galaxy at the speed of light. Second, in spite of its name, the 3DFM executable is called interface. I renamed it on my system, and I’ve been a lot happier since. For the record, FSV was a clean install all around.

XCruiser developer Yusuke Shinyama expressed regret that he has let the code stagnate in recent years; as an artificial intelligence researcher he considers spatial recognition an important area of study — but he just hasn’t had the time to devote to it. “Actually, I still have a plan to revise it to add lots of fancy functions (e.g. actual file operation like viewing files, the use of OpenGL, and auto-pilot function for a given location like Google Earth does),” he says. “Although this is just a toy application, I wish I could someday get involved with more serious research along this track.”

At one time, there were no fewer than six 3-D filesystem browsers available for Linux: the three mentioned above, plus 3Dfile, ThreeDFM, and TDFSB. You can still find packages for these other three applications online, but you are on your own getting them to compile and install. I beat my head against them for days without success. They may simply be too old, tied to version-specific features of the relevant libraries.

If you do take the plunge and get any to compile, drop me an email or post a comment below. Watch out for ThreeDFM, though: despite its official name, the downloadable package is titled 3dfm, which can get confusing if you have both it and 3DFM installed.

Take that, ya lousy dimension

While we are on the subject of filesystem visualization, I should note that there are several good utilities that perform the same function as the 3-D apps above, but with 2-D block diagrams.

Mayank Sharma wrote a good introduction to KDirStat and Baobab back in January in his piece “Disk usage analysis and cleanup tools.” In addition, GdMap and Filelight are GNOME and KDE tools (respectively) that take a similar approach. Filelight has the interesting advantage of showing directories and their contents in concentric rings, which can be easier to visualize than rectangular blocks. For low-resource systems, you also try xdiskusage, which is the grandaddy of them all.

However many dimensions you need, though, there is a filesystem visualization tool to help you. You’re probably not going to use them every day, but they are good to keep around — harnessing file information and adding it to a useful representation of the data is always welcome.