Wednesday 25 January 2012

Full path of service and service temporary directory when running


Execute the following command to view all processes and do a search of a service name (The service your searching for)
Code Snippet
  1. ps auxwwwe | grep SERVICENAMEHERE
End of Code Snippet

This will give you back some info about the service. We are really only interested in the ProcessID (PID). This will be an integer.

Example return
root 24466 0.0 0.0 1476 280 ? S 2009 0:00 supervise sshd

PID will be: 24466

So now navigate to /proc and view the contents. You will see a directory for your PID. View the contents of this directory to see the info for the service.

The file path is located @ exe in this example: exe -> /usr/sbin/servicename

No comments: