Mac OS X maintenance scripts

If you do not keep your computer turned on during nights, it is likely that all the maintenance scripts have not run properly. To manually run those cleanup scripts, open Terminal and type the following:

$ sudo periodic daily weekly monthly

Type your Admin password when prompted. The scripts will run in sequence but no feedbacks will be given. When each of those scripts run, they will write to their logs and you can check those log files to know when they were last run.

$ ls -al /var/log/*.out
-rw-r--r-- 1 root wheel 574968 Jul 31 08:24 /var/log/daily.out
-rw-r--r-- 1 root wheel 2343 Jul 31 08:25 /var/log/monthly.out
-rw-r--r-- 1 root wheel 5077 Jul 31 08:24 /var/log/weekly.out

In this example, all three scripts last ran on 31st July.

OSX Startup keys

Some useful startup keys for Mac:

  • C : Force boot from the CD-Rom drive
  • D : Force boot from the internal hard drive
  • Option : System picker show all bootable disks
  • Space Bar : Apple extension manager
  • Command-S : Boots Mac OS X into “Single User” mode
  • Command-V : Boots Mac OS X into “Verbose Mode”
  • Command-Option-P-R : Erases PRAM if held down immediately after startup tone
  • Command-Option-N-V : Erases NVRAM

More at MacOSX Things and OtherWorldComputing

Airport CLI

CLI Airport tool

To view current wireless info:

$ airport -I
agrCtlRSSI: -56
agrExtRSSI: 0
agrCtlNoise: -96
agrExtNoise: 0
state: running
op mode: station
lastTxRate: 54
maxRate: 54
lastAssocStatus: 0
802.11 auth: open
link auth: wpa-psk
BSSID: 0:d1:d1:d1:d1:d1
SSID: myAccessPoint
MCS: -1
channel: 1

To scan for available APs:

indiver$ airport -s

            SSID BSSID             RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
       HomeWWWrt 00:1d:1d:1b:1d:1d -53  1       N  -- WPA(PSK/TKIP/TKIP)
        CafeShop 00:1d:1d:19:19:19 -89  6       N  -- WEP
Posted in Mac