In UNIX, what is the command to kill a process?

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


Please Help Members By Posting Answers For Below Questions

What does the md command do?

564


What is the use of finger command?

589


What is s and g in sed command?

553


Which command can you use to find the currently running process in unix server?

581


What is the difference between awk and grep?

555






Is command prompt unix?

573


Explain the steps that a shell follows while processing a command.

678


Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?

630


How do I open a port?

583


What is ‘ps’ command for?

608


What is the comma to show the space allocation of files?

555


Explain command to display different lines that are found when compare two files?

673


What do know about tee command?

596


What are reported commands?

560


What are awk commands?

578