Drew's Picks The Mac Orchard Forums Alphabetical Listing of Essential Macintosh Internet Applications Frequently Asked Questions Help Home

PLTools

Command line tools for managing binary Apple property list (.plist) files.

Version 1.0 - May 15, 2005

Download version 1.0 of the tools for Mac OS X.

A simple rule for use of the scripts: only use them if you need to. Unfortunately, Apple's plutil provides no simple way of checking whether a .plist file is ASCII (XML) or binary before performing conversions. So, try grepping or editing the file in question using standard tools before reverting to the use of these scripts.

Overview

These scripts, written in Perl, are quite simple in nature. I spend a lot of time cleaning out and exploring preference files when administering Mac OS X machines, and Mac OS X 10.4's propensity toward binary .plist files made this process much more tedious.

The apparent alternative is a GUI, such as Apple's very own "Property List Editor" application. While such tools have their places, I am not a fan of managing .plist files with a GUI, especially when I don't necessarily know what I want to do until I perform a grep or two. Hence these scripts, which should work in any version of Mac OS X, but are ideally suited to Mac OS X 10.4 and higher. I wrote them to avoid painful retyping of Apple's plutil command. All three scripts run plutil in one form or another to get the job done, and their use should be obvious to just about anyone familiar with a UNIX command line.

Here's a basic overview of each command (usage for all three: command filename.plist):

  • plcat: A simple means for viewing an ASCII representation of a binary .plist file. Basically converts a binary .plist file to ASCII and displays it directly to the screen (/dev/stdout).
  • plmore: A simple means for viewing an ASCII representation of a binary .plist file, one screen at a time. Similar to plcat, but "piped" to more.
  • pledit: A simple means for editing binary .plist files in your favorite editor (vim, naturally!), automatically keeping a backup trail of each edit. This script temporarily converts the file to ASCII, enabling easier editing. Upon finishing your edits, the file is converted back to its original compact binary format. A complete backup trail (filename.plist.OLD, filename.plist.OLD.1, etc.) is kept for your convenience.

Those who prefer another editor (such as pico) may wish to edit line 58 of /usr/bin/pledit to use their favorite editor. I just happen to like vim.

The three scripts are installed in /usr/bin. Installing requires administrative access, and the scripts are installed with permissions of 755 (rwxr-xr-x). To uninstall, simply remove these three files. You may elect to remove the "PLTools.pkg" file in your /Library/Receipts folder as well.

If you have any questions, comments, or suggestions for improvement, please do not hesitate to contact me at dsaur@macorchard.com.

Also See . . .

Can't find what you're looking for? Try a search:

Also, if you have an older Mac, be sure to check out the "Classic" applications page for more options.

Finally, take a look at ALEMIA if you think you know that name of an application, but aren't quite sure.