The defaults Command
Another way to view and change the contents of a plist file is with the defaults command from the Terminal. The defaults command gives you an abstract way to read from and write to the preferences system. It lets you quickly modify any or all of an application’s saved-state settings, which can prove quite handy when debugging your own applications. As with any command-line program, you can write shell scripts to run several invocations of defaults with a single command, letting you set the application’s stage however you like in an instant.
If the preferences domain is bound to a specific host, you must specify a host with the -host option or refer to the current machine with the -currentHost option.
The following section contains a complete reference for the defaults command.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access