plutil

From RaySoft

plutil can be used to check the syntax of property list files, or convert a plist file from one format to another.[1]

Documentation

Syntax

plutil [PARAMETER ...] FILE [FILE ...]

Parameters

-convert FORMAT
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.
FORMAT 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
-lint
Check the named property list files for syntax errors. This is the default command option if none is specified.
-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.

Examples

Validate a plist file
plutil -lint 'test.plist'
Convert a binary file to a XML file
plutil -convert 'xml1' -o 'test.xml.plist' 'test.bin.plist'
Convert a XML file to a binary file
plutil -convert 'binary1' -o 'test.bin.plist' 'test.xml.plist'

References

  1. man 1 'plutil'