Just found this over at the macnn.com forums (credit to kennethmac2000 for that). There is no real command for doing portscans in the Terminal, so instead of installing nmap, just use the Network Utility from the command line like this:
% cd /Applications/Utilities/'Network Utility.app'Now you can do portscans from the command line using the following syntax:
% sudo cp Contents/Resources/stroke /bin/portscan
% rehash
portscan [address] [startPort] [endPort][Editor's note: I thought we had published something similar before, but I can't seem to locate it...]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020412080902228