How to get the launching dir of a command

If you run `ps -ef`, you can find a list of commands running in the system. Can you find the launching dir of each command, i.e., the folder where the command was launched? This can be useful for, for example, checking results.

It is easy: find the PID of a command (the 2nd field of the `ps` command output), and then run the following

pwdx <PID>        

Say, the PID is 1354, then run

pwdx 1354        

That's it. Have fund.

要查看或添加评论,请登录

Zhenguo Zhang的更多文章

社区洞察

其他会员也浏览了