Why does ENOENT mean "No such file or directory"?

mingchaoyan picture mingchaoyan · Nov 11, 2013 · Viewed 263.2k times · Source

What does the ENT mean in ENOENT?

Shouldn't the error:

No such file or directory

just be named by ENOFILE?

Is there any story or reason?

Answer

Some programmer dude picture Some programmer dude · Nov 11, 2013

It's an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories.

It's abbreviated because C compilers at the dawn of time didn't support more than 8 characters in symbols.