Thu, 22 Sep 2005

Simple periodic maintenance script

Because my macs are not always awake at the scheduled times for the periodic cron system maintenance tasks, I've started to run them from a script every week or so.

The simple script I use is shown below:

#!/bin/bash
set -v
# Running the daily,weekly and monthly periodic scripts
sudo periodic daily && sudo periodic weekly && sudo periodic monthly
# Updating pre-binding
sudo update_prebinding -root / -force
# Repair disk permissions
sudo diskutil repairPermissions /

[14:10] | [] | # | G

Wed, 20 Oct 2004

Simple script to tell the Mail.app to prefer text over HTML

Run the following script when the Mail.app is not running to set the preference to plain text over HTML.

#!/bin/bash
# false is the default for mail.app
#defaults write com.apple.mail PreferPlainText -bool false
set -v
defaults write com.apple.mail PreferPlainText -bool true

[10:13] | [] | # | G

Wed, 25 Aug 2004

Simple script to check the battery

Below is a simple script I use to check the battery on my laptop.

#!/bin/bash
ioreg -l | grep -i IOBatteryInfo

[15:49] | [] | # | G