我目前正在尝试创建一个终端shell,它为现有的plist添加一个名为“disabled”的布尔键,其值为true。
到目前为止,我有defaults write "/System/Library/LaunchAgents/com.apple.AppStoreUpdateAgent" disabled -bool true
我正确设置了布尔值,还是我没有-bool
?
应该“禁用”引号?
答案 0 :(得分:1)
defaults write /System/Library/LaunchAgents/com.apple.AppStoreUpdateAgent disabled -bool true
应该是正确的。 disabled
不需要引号,-bool true
应该有效,但正如@MichaelDautermann所提到的,你需要以root身份运行它。
您还可以使用launchctl unload -w /System/Library/LaunchAgents/com.apple.AppStoreUpdateAgent.plist
卸载作业。
-w Overrides the Disabled key and sets it to false. In previous ver-
sions, this option would modify the configuration file. Now the
state of the Disabled key is stored elsewhere on-disk.