1、根据进程名称查出进程id
pidof 程序名称
2、根据进程id查出该进程所在路径
pwdx 进程id
eg:
pidof nginx
4161 3528 3527 3526 3525 3524 3523 3522 3521 3520
pwdx 4161
4161: /usr/local/services/nginx-1.6.2/sbin
或者
ps -ef|grep 进程名
lsof -p 进程号
转载于:https://blog.51cto.com/leyin01/1707839
1、根据进程名称查出进程id
pidof 程序名称
2、根据进程id查出该进程所在路径
pwdx 进程id
eg:
pidof nginx
4161 3528 3527 3526 3525 3524 3523 3522 3521 3520
pwdx 4161
4161: /usr/local/services/nginx-1.6.2/sbin
或者
ps -ef|grep 进程名
lsof -p 进程号
转载于:https://blog.51cto.com/leyin01/1707839