Tag Archives: usage

dfc: The way it should be done

This is dfc, and this is how disk usage tools should behave:

2014-10-09-6m47421-dfc-01

That’s just clean, and easy, and clear. Well-labeled, with human-readable denominations and consistent use of color. Adjustable to the width of the terminal, with the addition of filesystem types, and a few other points of interest.

I can’t find a fault to report, unless I want to pick at its choices in color. And given that I can fix that in a few moments by editing .config/dfc/dfcrc, my complaints would be weak indeed.

Plus, dfc wins mega points for converting its output into vanilla HTML. That means you’re only a few keystrokes away from converting the above output into:

2014-10-09-6m47421-dfc-02

You Latex fiends get special attention from dfc too, as do the csv warriors in the crowd. dfc is that helpful. 😎

In fact, I can’t find a thing unlikeable about dfc. I’m more than willing to hand out a coveted-yet-valueless K.Mandla gold star to this one: ⭐ Enjoy! 😉

tdu (and dugroup): I can think of no better title

I don’t mind being wrong, so long as it’s in the right direction.

A year ago I thought tdu was somehow not working. It was an honest mistake; I couldn’t remember how or why it worked when I used it years ago, and thought it had fallen into disrepair.

Quite to the contrary though:

2014-05-20-jk7h5f1-tdu

The missing ingredient was that tdu, like ccze and some other utilities, really doesn’t do anything by itself — instead, it expects data to be piped through it. Ergo,

du -a | tdu

gives you an explorable tree showing file sizes and structure. Easy as pie.

Most of what you can extract from du comes through in tdu, although I notice that some conventions, like the human-readable flag -h, seem to pollute the output.

tdu has a few commands while running, most of which you can skim through by pressing the ? key. Perhaps most interesting are n, which sorts by name, or S, which sorts biggest to smallest.

For what it’s worth, there’s a second, lesser utility on the tdu home page, called dugroup. That lets you clump files in groups according to type — backup, image, sound file, etc. — when they appear in du’s output.

As you can imagine, tdu’s output can change a little bit with that thrown into the mix.

tdu’s home page describes it as “a text-mode disk usage full-screen folding outline doohickey utility thingamabob.” I honestly can’t think of a better title than that. 😉

pydf: Disk space, in color

I pulled pydf out of the dark corners of my memory, just to make an appearance here again today.

2014-03-21-lv-r1fz6-pydf

Simple enough. A good rundown on drives, mounted points, sizes, and space left. A visual indicator for those of us who think it important.

And color. Everybody likes color. 😉

And … I can’t think of anything else to say. I know I remember another disk usage tool that used solid blocks instead of ASCII characters, but I can’t recall it now.

I shall soon have to dredge that out of my memory too. 😕

ncdu: You need this tool

Just this morning I ran out of space on a small external drive that I use for system backups and stashing the odd ISO image.

And the first thing I grabbed after the error message was ncdu.

2014-01-31-lv-r1fz6-ncdu

ncdu is one of the best tools available that doesn’t fit neatly into any one category. It’s not quite a file manager, even though it does have some fundamental file management functions.

And it’s not a tree navigator, even if it does display its information in a basic array of nested directory links.

What it does instead is run through the tree, find file sizes and show what’s taking up space. And at times, that can be the most amazing thing.

ncdu’s help screens appear with the ? key, which makes it very easy to learn. Sorting, reverse sorting, display options and error messages are all listed there.

The conventional du and df tools are fine and dandy, and I wouldn’t suggest replacing them at all.

I can say though that ncdu replaced them for me, years ago. And I still use it, even today. 😐

dd, df and du: Pop quiz

Here are three tools you probably already know, if you’ve spent any time at the terminal since picking up Linux: dd, du and df.

All three come from coreutils, and I’m betting they’re installed on your system.

And in the interest of … being interesting, let’s turn this around and you give the answers.

  1. Show the amount of disk space that’s free, in units that are easily readable by (normal) human beings. Bonus: Show only one type of filesystem.
  2. Create an image of a floppy disc. 🙂 Bonus: Show the results on-screen … in hex. 😈
  3. Show the size of folders in the /etc directory, in numbers that are easy to read, and include a total for the entire directory. Bonus: Show only the top ten, sorted highest to lowest, but no total.

You’re allowed to use external programs to finish the bonuses. 🙂

Like I said, you probably already know these tools and even if you can’t come up with answers on your own, you have the entire Intarnets at your disposal. Consider it an open-book test. 😉

diskmoose: An example to the contrary

I try to be blunt when I run into programs I don’t care for. In some cases I just don’t know how to use it, and when I can, I plead ignorance.

Others I just don’t … see the value in.

2013-10-02-v5-122p-diskmoose

That’s diskmoose. And apparently that’s all it does. It has two dependencies: cowsay and go. One is miniscule, and the other is gargantuan.

It accepts no switches or flags. It has no man page. The home page gives no real guidance. All I can get it to do is what you see in the screenshot above.

I’m hoping something spectacular happens if any of those paths actually fill to less than 100Mb. Because as it is now, diskmoose has no real benefit I can garner.

For giving no details, for having no discernible controls, and for committing the cardinal sin of dragging in a massive dependency (43Mb!) that apparently adds nothing … I have to hand out an exceedingly rare un-smilie to diskmoose: 😦

discus: This is how it’s supposed to work

A few weeks ago I was whining because cdf wouldn’t behave like I knew it could — correction: like I knew it had. Here’s discus, which might be closer to what I was wanting.

2013-10-01-v5-122p-discus

That’s what I look for in a “graphical” disk usage monitor. Very nicely done. Clean columns, adjustable significant digits, pick your unit of size, and best of all … color!

Okay, I harp on color sometimes … all the time. 🙄 It’s a small thing I enjoy seeing.

That aside, discus does what I wanted, gives me clean output, handles most every instance without getting confused, and gives me enough customization to make me happy.

There’s not much more to say about a program which just shows disk usage. But there are good ways and bad ways to do that. As you will see later. … 😐

cdf: Useful, colorful … but headstrong

I’ve given it my level best, but I can’t seem to make cdf look like it should.

2013-09-13-v5-122p-cdf

It’s working, as far as I can tell, but seems to be doing what it wants, and not what I tell it to do.

I told it to show only ext2 filesystems with -t ext2 but it shows everything. I told it to switch to human-readable format, and it obliged, but still showed everything.

I can screen out what I want with grep, but that’s so … barbaric.

Overeagerness is not a setback. I got the information I wanted. I’m just not used to such headstrong applications.

And for some reason, the column display is spattered all over the screen. 😦

Just for the record I tried sending it through column but it didn’t help much.

This is not my first attempt with cdf, and I could swear it was behaving normally a while back.

Oh well. It has color. I can forgive it a few shortcomings if it keeps my eyes amused. 🙄

bwm-ng: Flexible, smart and pretty

bwm-ng comes along at just the right time. We haven’t seen any network monitors in quite a while.

Of course, I have to make the obligatory offhand remark that there are hundreds — literally hundreds — of network monitors and visualizers out there.

I’ve listed a few of them on this site, but I’ve barely scratched the surface.

But, seeing as we are in the “B” section now, bwm-ng has good timing.

2013-08-18-v5-122p-bwm-ng-curses2

Rather like VU meters, on stereo equipment from a long time ago.

That’s not the default display, by the way. That is with the “curses2” flag, which I am sure you can hunt down on your own.

bwm-ng will also output to html or csv, and has options to make sure your data can be converted to another format, be it spreadsheet or browser or whatever.

2013-08-18-v5-122p-bwm-ng-html

And best of all? It’s not just a network monitor, it can also watch disk access, and output in the same style — VU meters, or whatever.

Pretty nifty, if you ask me.