How to Determine What Program Is Listening on a Port in OS X or Linux

To determine what daemon or program is listening on a port in Linux or OS X you can use the lsof command. You need to run the command while logged in as root or if your operating system supports sudo like OS X, you can use that.

Command to run in Linux:

lsof -i -nP

Command to run in OS X:

sudo lsof -i -nP

Terminal

How to Determine What Shared Libraries a Program Requires in OS X

In Linux you can use the command “ldd” to display what shared libraries a program requires. This is handy if you need to figure out what missing libraries are required to get a program running. Here is the syntax for the Linux ldd command along with example usage for it:

ldd pathToExecuteable

Example:

ldd /usr/bin/ftp

Mac OS X does not include the ldd command. Instead you need to use the command “otool”. Otool gives you basically the same information as what ldd does in Linux. Here is the syntax for the otool command along with example usage for it:

otool -L pathToExecuteable

Example:

otool -L /usr/bin/ftp

Mac OS X Terminal

Unable to Move Fink Directory Error when trying to Self Update

Fink is a great program that makes installing open source applications easy in OS X. One day when running self update in fink I got an error that said the process was unable to move the Fink directory. To fix this error you need to remove the old fink directory and its associated temporary file:

sudo rm -R /sw/fink.old
sudo rm fink.tmp

Fink Logo

How to Extract the Windows Driver CD From Boot Camp Assistant

Burn the DMG image file located in the “Resources” folder which is inside the Boot Camp Package. The Boot Camp package is in the utilities folder and is what you click on to run Boot Camp Assistant.

  1. Right-click over the Boot Camp Assistant app in the Utilities folder.
  2. Select “Show Package Contents”
  3. Open the Contents folder and then the Resources folder
  4. Burn the DMG image file in that folder. The DMG image file will probably be named DiskImage.dmg

NOTE: These procedures are for Boot Camp beta running in Mac OS X Tiger 10.4. In Mac OS X 10.5 Leopard you can just use the Leopard install CD/DVD as the Windows driver CD.

iMac XP