Get real path of application from pid?

前端 未结 5 1645
轻奢々
轻奢々 2020-12-08 01:01

How can I get the process details like name of application & real path of application from process id?

I am using Mac OS X.

5条回答
  •  無奈伤痛
    2020-12-08 01:29

    Try use lsof

    example:

    lsof -p 1066 -Fn | awk 'NR==2{print}' | sed "s/n\//\//"

    output:
    /Users/user/Library/Application Support/Sublime Text 2/Packages

提交回复
热议问题