Linux View the directory where java is running

 

When viewing the process information through the ps and top commands, only the relative path can be found , and the detailed information of the process that cannot be found

 

 

 

You need to check the absolute path of pos_service.jar (under the directory) Use: ll  / proc / PID

 

 

When Linux starts a process, the system will create a folder named PID under / proc , and there will be information about our process under this folder, including a file named exe, which records the absolute path . ll or ls  -l command can be viewed.

ll /proc/PID

The cwd symbolic link is the process running directory;

exe symbolic link is the absolute path to execute the program ;

cmdline is the command line command entered when the program is running;

environ records the environment variables when the process is running;

The fd directory is a symbolic link to files opened or used by the process.

 

Guess you like

Origin www.cnblogs.com/syingBlog/p/12713399.html