Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a .plist-file with a structure like this:

<plist version="1.0">

I want to add or edit the RootRelativeBundlePath-key with the defaults write command. Another possibility would be writing the whole plist-file but it has to be the same exact structure.

How can I do this?

share|improve this question
up vote 4 down vote accepted

defaults can run out of steam quickly on more complicated structures. When it does, you'll be glad to know of PlistBuddy(8), which hides outside of your PATH at /usr/libexec/PlistBuddy.

share|improve this answer
It seems to be impossible to generate a plist starting with an <array>-element instead of a <dict>-element by using the defaults-command. Therefore your answer is correct. – Hedge Jun 20 '12 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .