linuxキルポートに対応するプロセス

 クエリポート8101

netstat  -anp  |grep 8101

結果13701はpidです

tcp6       0      0 :::8101        :::*         LISTEN     13701/./yuyin-robot 

次に殺す 

kill 13701

プロセスIDに従って実行中のファイルを取得します

プロセスを表示

ps aux

13701プロセスディレクトリを開いて、実行情報を取得します

cd /proc/13701

結果は以下のとおりです。

101716 -r--r--r--   1 takujo takujo 0 8月   6 13:58 arch_status
101696 dr-xr-xr-x   2 takujo takujo 0 8月   6 13:58 attr
101677 -rw-r--r--   1 takujo takujo 0 8月   6 13:58 autogroup
101672 -r--------   1 takujo takujo 0 8月   6 13:58 auxv
101701 -r--r--r--   1 takujo takujo 0 8月   6 13:58 cgroup
101692 --w-------   1 takujo takujo 0 8月   6 13:58 clear_refs
101680 -r--r--r--   1 takujo takujo 0 8月   6 13:58 cmdline
101678 -rw-r--r--   1 takujo takujo 0 8月   6 13:58 comm
101707 -rw-r--r--   1 takujo takujo 0 8月   6 13:58 coredump_filter
101700 -r--r--r--   1 takujo takujo 0 8月   6 13:58 cpuset
101686 lrwxrwxrwx   1 takujo takujo 0 8月   6 13:58 cwd -> /home/takujo/桌面/dev/goproject/yuyin-robot
101671 -r--------   1 takujo takujo 0 8月   6 13:58 environ
101688 lrwxrwxrwx   1 takujo takujo 0 8月   6 13:58 exe -> /home/takujo/桌面/dev/goproject/yuyin-robot/yuyin-robot

exeがディレクトリ/ home / takujo / desktop / dev / goproject / yuyin-robot / yuyin-robotに保存されていることがわかります。

おすすめ

転載: blog.csdn.net/takujo/article/details/107838008
おすすめ