How to know a specific launchd.plist file location?

后端 未结 7 933
天涯浪人
天涯浪人 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:33

    As of macOS 10.12.6 (not sure about earlier versions) it is possible to invoke: launchctl dumpstate and you will get a wealth of information about all running processes

    Look for as the first line of info pertaining to that job

    Here's a one liner to get all the active daemons and their plist paths:

    grep -B 1 -A 1 "active count = 1$" <<< "$(launchctl dumpstate)"

提交回复
热议问题