Reference Answer:
First step-Find the number of the process that corresponds to the port
[[email protected] ~]# ss -lntup |grep :22tcp LISTEN 0 128 :::22 :::* users: (("sshd", 1467,4) tcp listen 0 128 *:22 *:* users :(("sshd", 1467,3))
Step Two-show/proc/process number/CWD directory
[Email protected] ~]# ls-l/proc/1467/cwdlrwxrwxrwx 1 root root 0 June 01:25/PROC/1467/CWD
Process number/Other commonly used files in this directory:
CWD Symbolic link is the process running directory;
EXE symbolic connection is the absolute path to execute the program;
CmdLine is the command line command that is entered when the program is run;
Environ records the environment variables when the process is running;
The FD directory is a symbolic connection of the files that the process opened or used.
User Answer
1. We can get the PID of the process from the Netstat-antup command
2. Enter the directory named under the PID in the/proc directory
3. Enter Ls-ail, the result of the EXE link is the full path of the executable file details
Note
Today is the 101th Day of the day to accompany you and look forward to your progress .
For questions and answers, please leave a comment in the blog comments section .
Index of the topic of the previous period
http://lidao.blog.51cto.com/3388056/1914205
This article is from the "Lee blog" blog, make sure to keep this source http://lidao.blog.51cto.com/3388056/1951222
Old boy Education daily-101th Day-How do I find out which directory the process is in by port?