我的路由器指示一个 TCP 端口 (6183) 已被我运行的应用程序打开(我不知道)
使用 lsof
( as answered here ) lsof -iTCP:6183 -sTCP:LISTEN
,我发现launchd是罪魁祸首。
是否有可能找出launchd的哪个“脚本”负责?
最佳答案
您可以尝试搜索 launchd 使用的“.plist”文件,如下所示:
find ~/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons /System/Library/LaunchAgents /System/Library/LaunchDaemons -name "*.plist" -exec grep -H 6183 "{}" \; 2>/dev/null
find ~/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons /System/Library/LaunchAgents /System/Library/LaunchDaemons -name "*.plist" -exec defaults read "{}" 2>/dev/null \; | grep 6183
关于listener - 为什么launchd打开一个端口,监听什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21658821/