Manpage Monday: PlistBuddy(8)

2009-04-13 11:35:44 -08:00

PlistBuddy(8) is a command-line tool for editing property-list files, with a deeper reach than plutil defaults:

Entries consist of property key names delimited by colons. Array items are specified by a zero-based integer index. Examples:

  :CFBundleShortVersionString
  :CFBundleDocumentTypes:2:CFBundleTypeExtensions

Jonathan “Wolf” Rentzsch, in his del.icio.us bookmark for the manpage, says that PlistBuddy is “always at /usr/libexec/PlistBuddy on modern systems”.

2 Responses to “Manpage Monday: PlistBuddy(8)”

  1. Karl Kuehn Says:

    PlistBuddy and plutil arn’t really comparable. plutil is only good for checking that plists are structurally valid, and changing between binary and xml formats.

    I think you meant to compare PlistBuddy to the ‘defaults’ command. If so, then the comparison is apt, and PlistBuddy can help system administrators (or package writers) work with plists much better than the ‘defaults’ command. The most important differnce for most situations is that PlistBuddy allows you to set preferences that are one or more branches deep in a plist without replacing everything along that branch.

    It does have its own limitations, but is a valuable tool. For anyone looking to learn a little more about PlistBuddy, some time ago I wrote a snippit about it in an article I wrote: http://prowiki.isc.upenn.edu/wiki/Manipulating_Plists

    And my memory is that PlistBuddy being in /usr/libexec/ happened sometime after 10.5.0. Maybe 10.5.1 or 10.5.2. A little searching has failed to turn up the exact spot though.

  2. Peter Hosey Says:

    Indeed I did. Thanks!

Leave a Reply

Do not delete the second sentence.