PLTools - Perl scripts for cleaning prefs files
Version: 1.0These 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.
Operating System: Mac OS X
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.
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.
PLEASE NOTE: THESE ARE COMMAND LINE TOOLS. IF YOU ARE NOT COMFORTABLE WITH USING THE MAC OS X COMMAND LINE, THEN YOU DO NOT NEED THESE TOOLS.
Here are some key features of "PLTools":
· 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.