shell command to find a process id and attach to it?

前端 未结 6 1714
感动是毒
感动是毒 2021-01-14 14:04

I want to attach to a running process using \'ffffd\', what I manually do is:

# ps -ax | grep PROCESS_NAME

Then I get a list and the pid, the

6条回答
  •  别那么骄傲
    2021-01-14 14:25

    Do this way -

    ffffd PROCESS_NAME \`ps -ax | grep PROCESS_NAME | grep -v grep | awk '{print $1}'\`
    

提交回复
热议问题