【问题标题】:How to use launchctl to reload changes to plist?如何使用 launchctl 重新加载对 plist 的更改?
【发布时间】:2019-09-22 04:52:37
【问题描述】:

在 MaxOS 上,我创建了 ~/Library/LaunchAgents/x.plist。然后我用“launchctl load ...”加载它

我做了一些编辑,卸载并重新加载它。当我输入“launchctl list x”时,它不会在 plist 文件中显示我的任何模组。

如何让 launchctl 加载我的新更改?即使在我卸载它之后,它如何记住这个文件的第一个版本?它使用缓存吗?

【问题讨论】:

    标签: macos plist launchctl


    【解决方案1】:

    最快的更新方式是:

    # copy the new file to ~/Library/LaunchAgents
    
    sudo launchctl unload ~/Library/LaunchAgents/x.plist
    sudo launchctl load   ~/Library/LaunchAgents/x.plist
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-22
      • 1970-01-01
      • 2015-01-20
      • 2013-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多