brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: plutil -p prints a plist in a readable way

Mac terminal
~/tips/tip-macos-plutil-print

plutil -p ~/Library/Preferences/com.apple.finder.plist

Prints a macOS preferences file as readable text.

Preference files on a Mac are property lists, and many of them are binary. Open one in an editor and you get garbage.

plutil -p prints the property list as readable text.

plutil -p ~/Library/Preferences/com.apple.finder.plist

You can also check a file for syntax errors with -lint, and convert between formats with -convert. Supported formats include xml1, binary1 and json.

plutil -convert json -o - settings.plist

Here the -o - sends the result to standard output instead of rewriting the file. Without it, -convert writes the converted file back to the file system, so work on a copy if the original matters.

The caveat is that this is for reading and converting. If you want to change a preference, use defaults and not a hand-edited file, because the system may hold a cached copy of the settings.

I like this for the first look at an unknown setting. A binary plist is not something you can read, and a readable dump lets you search it, diff it and paste it in a bug report. Reading is free, so do it before you change anything in there.

Further reading: plutil.1 man page, On this site: softwareupdate –list shows pending macOS updates without opening Settings, On this site: pbcopy puts the output of any command on your Mac clipboard

More Mac terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac screencapture -R 0,0,1280,720 ~/Desktop/step-1.png leaks -atExit — ./myprogram --some-option All Mac terminal tips (60) All topics

Link