获取正在运行的进程的可执行路径
我希望获取正在运行的进程的可执行路径。假设我有两个 nginx 可执行文件正在运行。
C:/nginx/nginx.exe (or say usr/bin)
C:/second/nginx/nginx.exe (or say $home/local/nginx)
我希望获取正在运行的 nginx 文件的可执行文件路径,无论它是第一个还是第二个。我知道这个命令wmic process,其中“ExecutablePath like 'c:\\nginx\\nginx%'”在Windows中获取ProcessID。
有没有办法可以同时使用 Windows 和 Linux 的节点进程来做到这一点?我目前正在查看这个 - ps-node
https://github .com/neekey/ps/issues/83
I wish to get the executable path of running process. Say I have two nginx executables running.
C:/nginx/nginx.exe (or say usr/bin)
C:/second/nginx/nginx.exe (or say $home/local/nginx)
I wish to get the executable's path of the running nginx file whether it is the first or second. I am aware of this command wmic process where "ExecutablePath like 'c:\\nginx\\nginx%'" get ProcessID
in windows.
Is there a way I can do it using node process for windows and linux both together? I am currently looking at this - ps-node
https://github.com/neekey/ps/issues/83
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论