Answer Posted / srinivas kalvacherla
How to terminate process by name in UNIX
kill -9 `ps -ef | grep process_name | grep -v grep |
awk '{print $2}'`
Note that the grep process_name should be the command that
you ran. Also note that the commands after 'kill -9' are
enclosed in backtiks.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is {} in find command?
What is command statement?
What does find command return in unix?
Describe the zip/unzip command using gzip.
What is the comma to display different lines that are found when compare two files?
Are you in or at the office?
What is nr in awk command?
What is awk good for?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?
What does the “echo” command do?
How does pipe () work?
What does sed command do in unix?
What is difference between grep and find command in unix?
Which command is used to kill the last background job?