L3 Main Consulting & Services Courses & Course Descriptions Course Calendar Register and pay for classes or services About L3 Articles Pro. Mac. Training. Consulting.

L3 Training & Consulting

lsof - Command-Line Tip of the day

July 29th, 2008

So you want to monitor, continuously, the traffic in or out of your box on port 80. You want to monitor web traffic.

You’re going to run the following:

lsof -r -i:80

This will output something like the following:


COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
iTunes 3132 italisman 32u IPv4 0x808aa68 0t0 TCP 172.16.2.169:61644->akamai-072.sfo1.speakeasy.net:http (CLOSE_WAIT)
iTunes 3132 italisman 33u IPv4 0x7a15270 0t0 TCP 172.16.2.169:61731->akamai-071.sfo1.speakeasy.net:http (CLOSE_WAIT)
Safari 26240 italisman 9u IPv4 0x706f270 0t0 TCP 10.1.235.183:62762->95767-www1.affiliatemakeover.com:http (ESTABLISHED)
Safari 26240 italisman 12u IPv4 0x70c5a68 0t0 TCP 10.1.235.183:62759->209-20-80-227.slicehost.net:http (ESTABLISHED)
Safari 26240 italisman 13u IPv4 0x71e666c 0t0 TCP 10.1.235.183:62778->192.217.199.107:http (ESTABLISHED)
Safari 26240 italisman 16u IPv4 0x808ae64 0t0 TCP 10.1.235.183:62777->track1.mbl.vip.sp1.yahoo.com:http (ESTABLISHED)

Spotlight Calculator

March 25th, 2008

I tripped over the behavior in the Spotlight menu the other day of being a calculator.

You can just type in numbers with the following operators:

  • + (add)
  • - (subtract)

  • “/” (divide)

  • * (multiply)

Just like so:

Command Line Utility Du Jour

March 5th, 2008

A cool little utility that you can use to remote capture the screen and possibly scp it to yourself…

To capture the screen to a file on your desktop called testcap.png:

screencapture ~/Desktop/testcap.png