[Linux] pydf

I guess you’ll all know the tool df(1). As it is one of the standard tools (included in packages like GNU Core Utils or BuissyBox) every Linux installation will propably include a df application.

Now, there’s another tool, called pydf(1) (py, because it’s written in python1). What makes it different to df, is that it uses ASCII art to visualize the output of df. So you have progress bars showing you how full your hardrives are. Also it uses colors, which is pretty nice. You could define trasholds so for instance everything over 80% usage is shown in yellow and everything over 90% usage is shown in red. pydf offers a lot of customization options regarding the look of the information. The customization can be done globaly via /etc/pydfrc, or you just create ~/.pydfrc and have your local individual setup. The config file is well commented so you won’t need any additional information.

What it lacks though, is a way to narrow down the information shown (I’d rather like to just see my physical partitions, i.e. root, home and boot) – but anyhow, df lacks that possibility as well. I guess I’ll just have to write a little script to cut off all the not-needed information.

pydf in action

pydf in action

Still, it’s a pretty neat tool. I already added

alias df='pydf'

to my ~/.bashrc 😉

1 I once tried out to write some programs in python as this language is said to be a powerfull and clean language. This of course might be true (powerfull, because in Python you can use object oriented, aspect orientend and functional programming paradigma; clean, because Python uses indentation to structure text, not brackets, as most of the other languages do), but if you ever have to read a really large programm, where the identation was chosen to be three spaces, you’ll propably end up like me, throwing it all away, and never use it again 😉


Please comment. I really enjoy your thoughts!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s