2005/01/18 plutil

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



Hate these ads?

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         




Technorati tags:  

Comments /Words/2005_01_18.html


Add your comments

ad

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


ad

Views for this page
Today This Week This Month This Year  Overall
12352471 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.

Publishing your articles here

pavatar.jpg
More:
       - MacOSX




Unix/Linux Consultants


http://www.vss3.com SCO/Caldera OpenServer, Unixware & Linux. Tarantella & Non-stop Clustering


UBB Computer Services Support for Openserver, Unixware and Linux. Windows integration with Unix/Linux servers. Hardware, Backup and Networking issues. Located near Sacramento CA, we provide onsite support throughout Northern CA and Nationwide via remote access. We are a SCO Authorized Partner and a Microlite BackupEdge Certified Reseller.


http://www.davrom.com SCO, SnapGear and RedHat Consulting,E-mail and Internet


Twitter
  • May 17 09:33
    I have jelly legs from my workout today. I think it is dips that are hurting my neck, tho I can't imagine why.
  • May 16 08:08
    My tea tastes like chlorine. I dumped it out, tried just the teawater. That's fine. Why does my tea taste like chlorine?









Change Congress

Related Posts