Xcode command line tools…

apple logo
Apple Logo

Seems there is a issue when you install the xcode developers tools from the Apple app store, it does install the command line tools, if you want to run apps like homebrew etc. You do not need the command line tools to install homebrew, but you do need the command line tools.

To install the command line xcode tools. You need to start up xcode, the go file > preferences > downloads and the click on install Command line tools. Its that simple. Just sit back, wait for about 100mb to download and install.

Mounting Smb Shares in Mac OS X…

To quickly mount a network share. As in a samba or windows share. Open a terminal and type:

# mount -t smbfs //[email protected]/sharename share

The mounted directory can be found in the finder application under the shared machines.

To have the machine share show as a icon on the desktop, you need a create a share directory within the root directory on your disk.

nmap command…

Again here’s a reminder about the nmap command. I needed the command to tell what a udp port or a tcp port, was being used for. To test a listening UDP port, simply use nmap as follows:

# nmap -p [port] -sU -P0 [host name | ip address]

# nmap -p 123 -sU -P0 example.com

# nmap -p 123 -sU -P0

An example of the output from the command

# nmap -p 4000 -sU -P0 localhost
Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2008-05-20 11:00 EST
Interesting ports on localhost (
4000/udp closed icqNmap run completed — 1 IP address (1 host up) scanned in 0.057 seconds

find command…

Again here’s a reminder about the find command. The find command is a useful for everyday work, something we all use, but forgot how important it is. An example command is show below:

# find -name ‘*.log’ | xargs tar -cvf logs.tar

‘*.log’ looks for all files with the .log suffix.
| output to pipe.
xargs runs a command.
tar -cvf logs.tar tars the files found into a logs.tar

grep command…

Found a useful grep feature. To find a quote within a text or configuration file the grep feature. Also able to go recursive and non case sensitive. The command is as follow:

# grep -iR “yaboo” *

-R flag is to search recursive from the directory the command is started.
-i flag is not to search, but ignore case sensitivity.