Subscribe to
Posts
Comments
NSLog(); Header Image

.plist Checker

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…)

4 Responses to ".plist Checker"

  1. 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.

  2. 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 🙂

  3. I used xargs because I can never remember the right syntax for -exec.

  4. Heh, I can never remember the syntax for xargs. 🙂