What does ‘stat’ mean in this sentence

stat

This sentence is from a Linux command's return,I can only thought it as 'statistics' but it is the noun form rather than the verb form.

unable to stat ./config-2.6.32-431.el6.i686: No such file or directory
Some files were modified!

Best Answer

Unix, and by inheritance, Linux and *BSD, get the "file status" via one of the stat-related systems calls: stat(), fstat() and lstat(). I believe the original was stat(). The "status" in this case constitutes what we currently call metadata: information about the file, like ownership, permissions, sizes, access, modification and status change times, things like that.

Whoever wrote the error message you quote ("unable to stat") used the name of the Unix/Linux/*BSD system call as a verb. That would be consistent with a lot of the system calls, which have names like "read", "write", "close", "open". In the context of using and thinking about Unix system calls, using "stat" as a verb comes pretty naturally.

So, "to stat" a file, is to get some or all of the file's metadata.

Related Question