Difference between revisions of "Plutil"

From The iPhone Wiki
Jump to: navigation, search
(Apple's version.)
Line 1: Line 1:
  +
plutil is a program that can convert [[wikipedia:Property list|.plist]] files between a binary version and an XML version. Currently, there are two versions of this utility.
plutil is basically a plist reader/converter used by iTunes and Xcode.It converts a xml file to binary plist and native plist.
 
 
==Apple's plutil==
 
==Apple's plutil==
  +
'''''See also:''' [http://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/plutil.1.html plutil's man page]''
  +
<pre>
  +
plutil: [command_option] [other_options] file...
  +
The file '-' means stdin
  +
Command options are (-lint is the default):
  +
-help show this message and exit
  +
-lint check the property list files for syntax errors
  +
-convert fmt rewrite property list files in format
  +
fmt is one of: xml1 binary1
   
  +
There are some additional optional arguments:
Usage :
 
  +
-s be silent on success
  +
-o path specify alternate file path name for result;
  +
the -o option is used with -convert, and is only
  +
useful with one file argument (last file overwrites);
  +
the path '-' means stdout
  +
-e extension specify alternate extension for converted files
  +
-- specifies that all further arguments are file names
  +
</pre>
   
 
==Erica's plutil==
 
==Erica's plutil==

Revision as of 19:14, 14 February 2011

plutil is a program that can convert .plist files between a binary version and an XML version. Currently, there are two versions of this utility.

Apple's plutil

See also: plutil's man page

plutil: [command_option] [other_options] file...
The file '-' means stdin
Command options are (-lint is the default):
 -help		show this message and exit
 -lint		check the property list files for syntax errors
 -convert fmt	rewrite property list files in format
		fmt is one of: xml1 binary1

There are some additional optional arguments:
 -s		be silent on success
 -o path	specify alternate file path name for result;
		the -o option is used with -convert, and is only
		useful with one file argument (last file overwrites);
		the path '-' means stdout
 -e extension	specify alternate extension for converted files
 --		specifies that all further arguments are file names

Erica's plutil

plutil: [command_option] [other_options] file...
-h             show this message and exit
-l             output a list of the properties (default)
-k             list the top level property list keys
-t             create new property list(s) and exit
-c fmt         rewrite the property list in format
               fmt is one of xml1 binary1
Setting and accessing (writes to XML):
-v key         retrieve the value for key
-s key         set the value for key with the option given in -v
-i key         set int value for the key with the option given in -v
-f key         set float value for the key with the option given in -v
-0 key         set the key to the boolean value false
-1 key         set the key to the boolean value true
-r key         remove the key/value pair for key