Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

plutil(1) [osx man page]

PLUTIL(1)						    BSD General Commands Manual 						 PLUTIL(1)

plutil -- property list utility SYNOPSIS
plutil [command_option] [other_options] file ... DESCRIPTION
plutil can be used to check the syntax of property list files, or convert a plist file from one format to another. Specifying - as an input file reads from stdin. The first argument indicates the operation to perform, one of: -help Show the usage information for the command and exit. -p Print the property list in a human-readable fashion. The output format is not stable and not designed for machine parsing. The purpose of this command is to be able to easily read the contents of a plist file, no matter what format it is in. -lint Check the named property list files for syntax errors. This is the default command option if none is specified. -convert fmt Convert the named file to the indicated format and write back to the file system. If the file can't be loaded due to invalid syntax, the operation fails. fmt is one of: xml1, for version 1 of the XML plist format binary1, for version 1 of the binary plist format json, for the JSON format There are a few additional options: -- Specifies that all further arguments are file names -s Don't print anything on success. -r For JSON, add whitespace and indentation to make the output more human-readable. -o path Specify an alternate path name for the result of the -convert operation; this option is only useful with a single file to be converted. Specifying - as the path outputs to stdout. -e extension Specify an alternate extension for converted files, and the output file names are otherwise the same. DIAGNOSTICS
The plutil command exits 0 on success, and 1 on failure. SEE ALSO
plist(5) STANDARDS
The plutil command obeys no one's rules but its own. HISTORY
The plutil command first appeared in Mac OS X 10.2. Mac OS X August 30, 2002 Mac OS X

Check Out this Related Man Page

PLIST(5)						      BSD File Formats Manual							  PLIST(5)

plist -- property list format SYNOPSIS
Property lists organize data into named values and lists of values using several Core Foundation types: CFString, CFNumber, CFBoolean, CFDate, CFData, CFArray, and CFDictionary. These types give you the means to produce data that is meaningfully structured, transportable, storable, and accessible, but still as efficient as possible. The property list programming interface allows you to convert hierarchically structured combinations of these basic types to and from two formats: standard XML and an optimized, opaque binary format. This document describes the standard XML format. The data can be saved to disk and later used to reconstruct the original Core Foundation objects. Note that property lists should be used for data that consists primarily of strings and numbers because they are very inefficient when used with large blocks of binary data. PROPERTY LIST STRUCTURE AND CONTENTS Property lists are constructed from the basic Core Foundation types CFString, CFNumber, CFBoolean, CFDate, and CFData. To build a complex data structure out of these basic types, you put them inside a CFDictionary or CFArray. To simplify programming with property lists, any of the property list types can also be referred to using a reference of type CFPropertyListRef. In a CFDictionary, data is structured as key-value pairs, where each key is a string and the key's value can be a CFString, a CFNumber, a CFBoolean, a CFDate, a CFData, a CFArray, or another CFDictionary. When using CFDictionary as a property list, all keys must be strings. In a CFArray, data is structured as an ordered collection of objects that can be accessed by index. In a property list, a CFArray can contain any of the basic property list types, as well as CFDictionary and other CFArray objects. PROPERTY LIST XML TAGS When property lists convert a collection of Core Foundation objects into an XML property list, it wraps the property list using the document type tag <plist>. The other tags used for the Core Foundation data types are listed in the table below: Core Foundation Types with XML Equivalents CF type XML tag CFString <string> CFNumber <real> or <integer> CFDate <date> CFBoolean <true/> or <false/> CFData <data> CFArray <array> CFDictionary <dict> When encoding the contents of a CFDictionary, each member is encoded by placing the dictionary key in a <key> tag and immediately following it with the corresponding value in the appropriate tag from the table above. See EXAMPLES below for an example XML data generated from a property list. The XML data format is documented here strictly for help in understanding property lists and as a debugging aid. These tags may change in future releases so you shouldn't rely on them directly. You should not edit the XML data by hand unless you are very familiar with XML syntax and the format of property lists. If you want to modify the contents of a property list saved on disk as XML data, use the Property List Edi- tor application. More complete documentation can be found on disk at /Developer/Documentation/CoreFoundation/ProgrammingTopics/CFPropertyLists/CFPropertyLists.html or online at BINARY FORMAT PROPERTY LISTS The binary property list format is opaque and does not use XML. However, binary property lists and XML property lists are generally inter- changeable. The plutil(1) utility may be used to convert property lists between different formats. For example, to view a binary property list in XML format on stdout: plutil -convert xml1 -o - <file name> EXAMPLES
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" ""> <plist version="1.0"> <dict> <key>Year Of Birth</key> <integer>1965</integer> <key>Pets Names</key> <array/> <key>Picture</key> <data> PEKBpYGlmYFCPA== </data> <key>City of Birth</key> <string>Springfield</string> <key>Name</key> <string>John Doe</string> <key>Kids Names</key> <array> <string>John</string> <string>Kyra</string> </array> </dict> </plist> SEE ALSO
plutil(1) Mac OS X July 9, 2003 Mac OS X

Featured Tech Videos