How to know a specific launchd.plist file location?

后端 未结 7 950
天涯浪人
天涯浪人 2021-01-31 10:25

Is it possible to know the .plist file location which is loaded into the launchctl command?

The label name is listed with \"launchctl list\" and its contents can be view

7条回答
  •  滥情空心
    2021-01-31 10:47

    Since launchctl list list PIDs, one method is to use lsof command to see all loaded files of the process, e.g.

    launchctl list | grep -o '^[0-9]\+' | xargs -n1 lsof -p | grep plist$
    

    Another way is to run fs_usage command and re-load the .plist file, e.g.

    sudo fs_usage | grep -w launchd | grep -w plist
    

提交回复
热议问题