Mac OS X: checks the syntax of property list files. In your ~/Library/Preferences folder (and in /Library/Preferences) are lots of little XML files that tell apps and system programs how to act. You can read a bit more about them at /MacOSX/configxml.html, at /MacOSX/twosafaris.html and at /Basics/basicxml.html Personally, I have never (yet) had any problem with a preferences file, but it is suggested that you run plutil now and then to verify integrity. To do so, you'd just:
sudo plutil -s ~//Library/Preferences/*.plist /Library/Preferences/*plist
I've also read that plutil can think there's a problem where there is none, though I've never experienced that either. It's not a bad idea to keep safe copies of known good plist files where you cabn get at them quickly if necessary.
This can also convert plist files to a binary format or back to the ordinary text format. Should you every come across a binary format plist, "file" may not recognize it as such:
$ cat foo.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSTreatUnknownArgumentsAsOpen</key>
<string>NO</string>
</dict>
</plist>
$ cp foo.plist foosafe.plist
$ file *plist
foo.plist: ASCII text
foosafe.plist: ASCII text
$ plutil -convert binary1 foo.plist
$ file *plist
foo.plist: \<head HTML document text
foosafe.plist: ASCII text
$ od -c foo.plist
0000000 b p l i s t 0 0 321 001 002 _ 020 035 N S
0000020 T r e a t U n k n o w n A r g u
0000040 m e n t s A s O p e n R N O \b 013
0000060 + \0 \0 \0 \0 \0 \0 001 001 \0 \0 \0 \0 \0 \0 \0
0000100 003 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000120 .
0000121
$ plutil -convert xml1 foo.plist
$ diff *.plist
$
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 1 | 23 | 52 | 471 | 2,923 |
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Add your comments