Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Run Repair Permissions Automatically On A Schedule In the Background Late at Night, Elegantly' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Run Repair Permissions Automatically On A Schedule In the Background Late at Night, Elegantly
Authored by: Lectrick on Jun 05, '03 07:39:43PM

A more elegant way to do this is to create a daily.local script in /etc/ with the single line of "diskutil repairPermissions /"

cd /etc/
sudo pico daily.local

diskutil repairPermissions /

control-O to save out, hit enter
control-X to exit

sudo chmod +x daily.local

You're done!

This file is then called by the "daily" script which is already run by the default OS X installation, every night at 3:30AM (which you can see if you use Cronnix- if you pick the menu command "Open System Crontab" you will see "periodic daily/periodic weekly/periodic monthly" which are just ways to execute maintenance scripts.)

The other nice thing is that a new OS X install (as long as you install over your existing install) likely won't obliterate this file. (if you want, you can probably make a non-root-user copy of this file in your home directory somewhere as a backup)



[ Reply to This | # ]