unix

Things of interest to unix nerds (rather than practical sysadmin stuff)

List binary objects by size.

September 2, 2009
By gary

Sometimes you will want to know what a binary file contains (functions, arrays, objects) etc. The ‘nm’ command will do that for you, and the following 1-liner will sort the output by size. I use this to determine why some source compiled on Solaris is larger than when compiled in linux. e.g. nm...
Read more »

Tags: , , , , ,
Posted in unix | No Comments »

Logging messages to OS X (And other Unix’s)

January 6, 2009
By gary

Use the command “logger”  to send a message to syslogd.  It seems that in OS X at least, the syslog is configured to discard messages sent to user.info, but it does keep messages sent  to user.error, user.warn and user.notice e.g. lovebox:~ gjl$ logger -p user.err "Hello World" lovebox:~ gjl$ logger -p user.info "Hello World2" lovebox:~ gjl$ logger -p...
Read more »

Posted in unix | No Comments »

Oracle for Sysadmins

November 27, 2007
By gary

Set the ‘EDITOR’ variable for the user ‘oracle’. Doing so will allow you to edit your sqlplus commands using a reasonable editor. After executing a piece of SQL in sqlplus, just type ‘edit’ or ‘ed’ and you’ll be transported to your editor. In vi just type :q to get back to the...
Read more »

Tags:
Posted in oracle, sysadmin, unix | No Comments »