Location-aware Macbook Settings • Andrew J. Freyer


Want to log a history of your locations?

It's REALLY easy with shell scripts!

Copy this shell script into Text Editor:


echo $(date) $(defaults read com.andrewjfreyer.AirportLocation CurrentLocation) >> LocationLog.txt

Save it as "LogLocations.sh"

Then, add a Shell Script to a Snapshot.

sh /Path/to/LogLocations.sh

Then you will have your locations logged, with a timestamp!


  1. Awesome! Thanks!

  2. Curious...

    Could this script be adjusted to save a log file to a Dropbox folder and therefore give you an indication of where your computer was if ever it got stolen? (Assuming the thief opens the computer to use it rather than completely wiping the drive clean first).

  3. Sure!

    Just change the ">> LocationLog.txt" part of the shell script to:


    make sure to enclose it in quotes!

  4. Also, in 0.5083 (mid-May probably) I'm adding a location log iCal calendar. It'll show you where you've been and for how long!

  5. Awesome! Thanks for the quick response.