OSX TerminalOne of the minor annoyances in OSX is its error messaging. We’re all used to seeing error messages like:

The operation can’t be completed because an unexpected error occurred (error code -1309).

Thanks. That’s helpful.

The message tells us nothing, but it turns out that it’s pretty easy to learn more from the error number. All you have to do is type one line into Terminal. Open Terminal (in Applications > Utilities) and type the macerror command followed by the error number:

macerror -1309

The macerror command for error -1309 returns:

Mac OS error -1309 (fileBoundsErr): file’s EOF, offset, mark or size is too big

This gives us a hint that the file we’re trying to work with is actually too big for the filesystem to handle (a very big file indeed considering that the old Mac HFS filesystem had a file size limit of 2 gigabytes, FAT32 is limited to 4GB and Mac HFS+ is limited to 8 exabytes – so big as to be practically unlimited). We can’t do much about the filesystem limit, but at least we can stop banging our heads against the desk trying to figure out why that file won’t open.

The macerror command may not decipher every error number you encounter. If it fails, you can always search for the error in MacErrors.h.

Give these tools a try next time you run into a mysterious error. You’ll save yourself some time and headaches and you might learn a little more about your Mac.

Pin It on Pinterest