A simple Mac OS X maintenance shell script

I, like so many of my fellow Macintosh users want to keep my OS X installation well maintained. So i sat down and read a few man pages describing those nifty cli utilities that are included in OS X. Since OS X is a UNIX style operating system I decided to create a small shell script to perform the following maintenance tasks for me .

Repair Filesystem Permissions
Verify Disks
Run Periodic (cron) jobs
Update Prebindings
Verify Preference Files
Displa Cache size
Clear Cache

If you find the script interesting and want to use it on your mac you need to perform a few simple steps:

1. Copy the script to a text editor. I prefer vi or TextEdit.app.
2. Save the file. I will use the file name “MaintainMyMac.sh” during the rest of this description.
3. Make the file executable. To do that start Terminal.app and type chmod +x <path to MaintainMyMac.sh>
4. Now you can run the shell cript. E.g. ./MaintainMyMac.sh

I hope that you find this script as useful as I do.

You will be using this script at your own risk. I will not be responsible for loss of data, dogs, cats, keys or anything else.

2 Replies to “A simple Mac OS X maintenance shell script”

Leave a Reply

Your email address will not be published.