kale ([info]kalephunk) wrote,
@ 2009-02-15 07:36:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Linux tip-of-the-day
For some reason, I always thought that `perror' was solely for MySQL errors, since it comes with MySQL. 

I AM A FOOL.

From the man page:

DESCRIPTION
       For most system errors, MySQL displays, in addition to an internal text message, the system error code in one of the following styles:
 
          message ... (errno: #)
          message ... (Errcode: #)
 
       You can find out what the error code means by examining the documentation for your system or by using the perror utility.
 
       perror prints a description for a system error code or for a storage engine (table handler) error code.


Very handy for interpretting strace output.  Also of note -- you can man syscalls like getsockopt and whatnot -- also useful for strace.  In fact, here's a handy chart about the man page sections, which always made me wonder what they are, so I looked them up and found a pretty chart:


Section #Topic
1Commands available to users
2Unix and C system calls
3C library routines for C programs
4Special file names
5File formats and conventions for files used by Unix
6Games
7Word processing packages
8System administration commands and procedures

 



Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…