Is it possible to edit plist files using their xml format ?

I explain:

in /Library/Preferences, I have a lot of .plist files (e.g. /Library/Preferences/com.apple.SoftwareUpdate.plist).

When browsing this folder in the Finder, I can preview (using QuickLook) those files in their xml format.

User uploaded file


But if I try to open this file


- with TextEdit, I get some binary version like this:


bplist00fl


## % &( #_ LastSuccessfulDate_ IgnoringUnseenRamped_ LastAttemptSystemVersion_ LastBackgroundCCDSuccessfulDate\SkipLocalCDN_ DidRegisterLocalUpdates_ lastDownloadError_ LastUpdatesAvailable_ LastRecommendedUpdatesAvailable_ AutomaticDownload_ RecommendedUpdates_ LastFullSuccessfulDate_ PrimaryLanguages]

... and so on ...


- with nano editor in Terminal (nano /Library/Preferences/com.apple.SoftwareUpdate.plist), I get the same.


- with pico editor in Terminal (pico /Library/Preferences/com.apple.SoftwareUpdate.plist), same again.


Moreover, when I edit the file using pico or nano, Finder & QuickLook can't provide a preview anymore, and the file modified this way is overwritten at next use

(in this case, at the next Software Update check) by its old version.


Here is my question:

is there a way to edit the xml version of the plist, and save it in a way OS X will take your changes into account ?

And yes, I know there are lots of third-party apps which can do this, but I would rather prefer to get a way to do this without any extra install or utility, only using the OS X built-in tools.


Is this possible ?


Thanks to those who will read me, big thanks to those who will take some time to answer 😉

OS X Mavericks (10.9.1)

Posted on Jan 22, 2014 12:17 PM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Jan 22, 2014 12:26 PM

Xcode includes a .plist editor

8 replies
Sort By: 

Jan 22, 2014 12:49 PM in response to Phil-CB

Thanks for the reply, but installing third-party tools or utilities is not an option for me.

Phil-CB wrote:


Here is my question:

is there a way to edit the xml version of the plist, and save it in a way OS X will take your changes into account ?

And yes, I know there are lots of third-party apps which can do this, but I would rather prefer to get a way to do this without any extra install or utility, only using the OS X built-in tools.


Is this possible ?

Reply

Jan 23, 2014 11:27 AM in response to Barney-15E

Found answer late yesterday, as Barney-15E it seems.


plutil is simply included in OSX Mavericks.


  • plutil -convert xml1 /file-i-wish
  • nano /file-i-wish & save file
  • plutil -convert binary1 /file-i-wish


And changes are taken into effect.

Simple, effective, what I was searching for.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is it possible to edit plist files using their xml format ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.