Monday, July 03, 2006

Unix : List symbols from object files

Often when adding a method to a shared library, the method can't be found when accessed from another program. You start to wonder whether you made a mistake and whether the new method was indeed added. A simple way to check is to use the "nm" command e.g.

nm libraryname.sl

This lists all the symbols so best to do something like:

nm libraryname.sl | grep nameofmethod

Enjoy!

Unix : Sorting directory by date (ls -ltr)

Almost everyone knows the

ls -l

command to display information about the contents of a directory. Sometimes you need to display it in date order so

ls -lt

To display in ascending date order (i.e. most recent last)

ls -ltr

Enjoy!