I am currently trying to code a script that will remove files from the following directories so as to clear out corrupted font caches:
/System/Library/Caches/com.apple.ATS.System*
/System/Library/Caches/com.apple.ATSServer.FODB*
/System/Library/Caches/fontTablesAnnex*
/Users/CURRENTUSER/Library/Preferences/com.apple.ATS.plist
Those are the exact files I need to remove. However, no matter what method I try (the do shell script “COMMAND” with administrator privileges, way) or the (sudo rm -f PATHHERE, way) I can’t get it to work. Essentially, Im wondering if I actually need to setup the ROOT account with a password, in which case, is there a way to do that without having the OTHER login thing show up on the login screen? Preferably I would like to do this without having that OTHER thing show up. I’m a pretty big newbie to applescript/shell scripting so please be kind. Oh, and it needs to be able to work on any version of 10.3 and 10.4.
Also, I want to be able to script this so the user doesn’t have to type in anything. I really don’t want to have to go around and set every mac up with a root account before the script will run either. So if the setting up of the root account could be completely scripted as well that would be swell. This is so rediculous. I mean, I know they want to protect the system files, but for gosh sakes back off a little.
The real trouble comes when more then one active user is using the machine, then multiple instances occur for each file like com.apple.ATS.System_275 for the second user. So I could do all this with applescripts and move to trash command I think, but no wildcards means there is no good way to delete ALL font cache files that exist in those locations.