linux to see the process start path

In the process we will expect to see linux with ps -ef | grep XXX
But seeing is not a full path, how to see the full path to it?
After each process starts in / proc following a path corresponding to the pid
For example: ps -ef | grep python
Display: oracle 4431 4366 0 18:56 pts / 2 00:00:00 python Server.py
4431 is the process ID
To the next / proc / 4431, ls -l will see:
0 Total amount
-r--r--r--    1 oracle   oinstall        0 12月 29 18:58 cmdline
lrwxrwxrwx    1 oracle   oinstall        0 12月 29 18:58 cwd -> /XXX/ultserver_aa
-r--------    1 oracle   oinstall        0 12月 29 18:58 environ
lrwxrwxrwx    1 oracle   oinstall        0 12月 29 18:58 exe -> /usr/bin/python2.4
dr-x------    2 oracle   oinstall        0 12月 29 18:58 fd
-r--------    1 oracle   oinstall        0 12月 29 18:58 maps
-rw-------    1 oracle   oinstall        0 12月 29 18:58 mem
-r--r--r--    1 oracle   oinstall        0 12月 29 18:58 mounts
lrwxrwxrwx    1 oracle   oinstall        0 12月 29 18:58 root -> /
-r--r--r--    1 oracle   oinstall        0 12月 29 18:58 stat
-r--r--r--    1 oracle   oinstall        0 12月 29 18:58 statm
-r--r--r--    1 oracle   oinstall        0 12月 29 18:58 status
Note cwd, a process that is the path you want to find. .

Guess you like

Origin www.cnblogs.com/hntpy/p/11413606.html