plutil
plutil can be used to check the syntax of property list files, or convert a plist file from one format to another.[1]
Documentation
- man 1 'plutil' [EN]
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:
- -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
- ↑ man 1 'plutil'