Tag Archives: filesystem

stat: Simple file information, and more

I have stat on my list as a remnant of the indomitable coreutils package, and looking back I’m not sure why I held it out of the massive missive I posted a month ago. đŸ˜•

stat has a few gimmicks worth showing. Here’s its basic effort.


Just stat by itself reveals a lot of information about a physical file. Its size, the number of blocks, the device ID, inode and access and modification dates are all listed there, along with ownership and access privileges. Not bad.

The -f flag tells stat to supply information about the filesystem, and not just the file. So in the second readout, you’ll see the type, the free and total blocks, free and total inodes, etc.

Of course stat has a few other flags that will allow you to fine-tune its display or even customize the arrangement, sort of like the date command. It’s worth checking out what stat can show, mostly because it’s flexible in its output.

Which, now that I think about it, is probably why I didn’t just dump it into that big list. … :\ đŸ™‚

locate: A small part of a larger tool

I’ll mention locate very quickly, since it starts with L but is really only a small part of the larger mlocate suite.


Instinctively I rely on find over something like locate, mostly out of habit but also because I don’t like the idea of relying on a database to find things on my computer.

That probably hearkens back to the days of Windows drive indexing, and that $&%! search dog.

Be that as it may, mlocate wasn’t installed by default on my Arch system, which means I had to specifically ask for the software, then update it with updatedb.

After that, I could search for files with locate. I will give it a point for being speedy, but that’s about all I can say for it.

I don’t have a Debian machine on hand right now, so I can’t be sure how it’s handled there.

extundelete: When the time comes, remember it

A lot of times I put forth emergency tools on this blog in the context of, “I’ve never had to use this, and happily so.” That was the case with ddrescue.

Unfortunately, I can vouch personally for extundelete (and a couple of other undelete tools for other file systems). Yes, it’s true. In the past, a younger and more foolish K.Mandla deleted some files and then whimpered in horror.


It happens to everyone I guess. The only difference is knowing well enough how to get something back before all hell breaks loose.

extundelete isn’t fancy, doesn’t have a lot of bells and whistles, and doesn’t know exactly how or what you want to recover.

But it has saved my bacon more than once, and for that I am quite thankful.

The final, awful irony of me showing — or even just mentioning — extundelete is that you need a journaling file system if you expect it to undelete things from your system.

And for years now, I’ve only used ext2 … which doesn’t use journaling.

So it is rather odd that I would vouch for a tool as a winner, when I can’t even show that it works as promised.

No harm done, I guess. Remember this moment, when the time comes for you to go running after extundelete. Remember K.Mandla saying, “Relax, it’ll work fine. …” đŸ˜‰