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.

2014-10-27-6m47421-stat

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. …:\🙂

2 thoughts on “stat: Simple file information, and more

  1. Pingback: Links 28/10/2014: PiFxOS, The Document Foundation in OSBA | Techrights

  2. Pingback: Tricks of the trade | Motho ke motho ka botho

Comments are closed.