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

Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

839


What is rmdir command?

780


How do you grep a case insensitive?

721


How does the system know where one command ends and another begins?

1843


What is grep in bash?

764






Why is awk called awk?

764


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

806


What do chmod command do?

801


Name the various commands that are used for the user information in unix.

763


What is unix command line?

799


What is the use of find command in unix?

748


Describe the usage and functionality of the command rm –r * in unix?

1365


What does the md command do?

762


What does touch command do in unix?

960


how to sort the content of the file based on numeric values

1496