When I use defaults write domain key value
the information is written to ~/Library/Preferences/domain.plist
.
When I use the -currentHost
flag, it has a higher priority then when I just use defaults
without a specified host.
But where is the value actually written to? It is consistent between system startups, so it must be somewhere on the disk…
Best Answer
If you use
-currentHost
withdefaults
it acts on.plist
files in:As an example, I did not have a
com.apple.finder
plist file at that location and when I executed the following command, one was created at that location.Note the full file name contains a UUID however you do not need to include it when
-currentHost
is used, the normal naming is all that's needed as shown in the command line above.Example:
$HOME/Library/Preferences/ByHost/com.apple.finder.6966D045-28DC-544A-97C2-98CDB668DC8B.plist