.plist Checker
Posted December 7th, 2004 @ 11:07pm by Erik J. Barzeski
This might come in handy if you suspect that one of your Prefs files is corrupt.
sudo plutil -s ~/Library/Preferences/*.plist
Thanks to José for reminding me of this! (Obvious changes will be needed if a) you don't need to be root, and b) you want to check subfolders, or a different folder, or whatever. Y'all are smart enough to do that…)
Posted 07 Dec 2004 at 11:53pm #
You shouldn't run it as root if you're only checking ~/Library/Preferences. And there are plist files in subdirectories of that directory, so you might want to do something like 'cd ~/Library/Preferences; find . -name '*.plist' -print0 | xargs -0 plutil -s' instead.
Posted 08 Dec 2004 at 8:51am #
Guess I'll quit lurking and post something for once 🙂
I've had to do similar things on our file servers at work before we do OS upgrades to our SOE; checking plists for sanity *before* you fix them is IMHO a Good Idea�. Obviously that's one situation where you'd need to run the command as root.
cd ~/Library/Preferences; find . -name "*plist" -exec plutil -s {} \;
Not sure why you'd be using xargs however. This will do just as well - but then I've never used xargs much 🙂
Posted 08 Dec 2004 at 10:10pm #
I used xargs because I can never remember the right syntax for -exec.
Posted 08 Dec 2004 at 10:14pm #
Heh, I can never remember the syntax for xargs. 🙂