CentOS7(linux) 通过服务名查询安装目录

 

#ps aux|grep nginx

root 1231 0.0 0.0 46336 956 ? Ss 04:21 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 1232 0.0 0.2 46808 2144 ? S 04:21 0:00 nginx: worker process
root 1247 0.0 0.0 112660 972 pts/0 R+ 04:56 0:00 grep --color=auto nginx

# ls -l /proc/1231/exe

lrwxrwxrwx. 1 root root 0 Nov 6 04:24 /proc/1231/exe -> /usr/sbin/nginx

 

posted @ 2017-11-06 18:00  三瑞  阅读(3279)  评论(0编辑  收藏  举报