![Forrest logo](/images/logo.png)
defaults:tldr:d64b6
The command defaults read "${application}" "${option}"
is used to retrieve the value of a specific option/setting from a specific application's preferences (plist) file.
Here is how it works:
-
${application}
is a placeholder that should be replaced with the actual name of the application whose preferences you want to read. This can be any macOS application installed on your system. -
${option}
is a placeholder that should be replaced with the specific option or setting whose value you want to retrieve from the application's preferences. This can be any valid preference key associated with the application.
For example, let's say you want to retrieve the value of the "FontSize" option from the "TextEdit" application's preferences. You would use the command:
defaults read "com.apple.TextEdit" "FontSize"
This command would read the TextEdit application's preferences file and return the value of the "FontSize" option, which specifies the font size used in the application.
The output of the command will be the value of the specified option/setting, which could be a string, a number, or another data type depending on the specific option.