[[!tag moreutils errno]]

I've had a little command line tool called errno for many years now. It's a short Python script, and lets me look up Unix errno names and values given values or names.

$ errno 2
ENOENT 2 No such file or directory
$ errno EEXIST
EEXIST 17 File exists
$

This is occasionally very useful when reading logs from various programs. I thought it might be useful for others as well, so I decided to rewrite it in C so I can offer it to become part of moreutils.

It is now in the master branch of moreutils.

Today I added a couple of options: --list lists all the errno values, and --search does a full text (case insensitive) search of all descriptions. I also added a script that lets you do the search in all installed locales. (These changes are waiting for Joey to merge them. Meanwhile, they're at gitorious.)

$ errno-all onnistu | sort -u
EDEADLOCK 0 Onnistui
ENOMEM 12 Muistin varaaminen ei onnistu
ENOTSUP 0 Onnistui
EWOULDBLOCK 0 Onnistui
$ 

(That's Finnish.)

Hopefully others will find this useful as well.