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 »
unix
Things of interest to unix nerds (rather than practical sysadmin stuff)
List binary objects by size.
Logging messages to OS X (And other Unix’s)
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 »
Oracle for Sysadmins
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 »