PLUTIL(1) | General Commands Manual | PLUTIL(1) |
plutil
— property
list utility
plutil |
[command_option] [other_options] file
... |
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
-p
-lint
-convert
fmt-convert
objc -header
-insert
keypath
-
type
[value] [-append
]-append
is specified,
keypath is expected to reference an array and the
value will be appended to the end of the array.-replace
keypath
-
type
value-remove
keypath-extract
keypath fmt
[-expect
expect_type]-expect
expect_type is used
and the value at keypath does not match that
type.-type
keypath [-expect
expect_type]-expect
expect_type is used and the value at
keypath does not match that type.-create
fmtThere are a few additional options:
--
-n
-extract
using the
raw format, will not print a terminating newline
character. This aids use in shell interpolation.-s
-r
-o
path-e
extensionfmt is one of:
-extract
, will print the
unencapsulated value at the keypath. See
RAW VALUES AND
EXPECTED TYPES below. The result will be output to stdout unless
-o
is specified.keypath is a key-value coding key path, with one extension: a numerical path component applied to an array will act on the object at that index in the array or insert it into the array if the numerical path component is the last one in the key path.
type is one of:
-bool
-integer
-float
-string
-date
-data
-xml
-json
-array
-insert
. Does not
accept a value.-dictionary
-insert
Does
not accept a value.value will be assigned to the
keypath specified with the
-insert
or -replace
flags.
With -extract
keypath raw the value printed
depends on its type.
Following are the possible expect_type
values and how they will be printed when encountered with
-extract
keypath
raw
-type
keypath is used.
The plutil
command exits 0 on success, and
1 on failure.
The plutil
command obeys no one's rules
but its own.
The plutil
command first appeared in macOS
10.2.
The raw format type,
-type
command, -expect
option, and -append
option first appeared in macOS
12.
March 29, 2021 | macOS |