How to stop an infinite loop in unix?



How to stop an infinite loop in unix?..

Answer / Ravi Rawat

To stop an infinite loop in Unix, you can use the keyboard shortcut `Ctrl+C` or kill the process with its PID using the command `kill <PID>`. If a process won't terminate, you can try using `kill -9 <PID>`, but be careful as this forcefully kills the process without graceful shutdown.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix General Interview Questions

What is buffer header unix?

1 Answers  


1)How to schedule a job,that will periodically execute in second by crontab? 2)I know only second specific time to execute the job. like 10 10 * * * sleep 40&&ps -l>/dev/pts/1 It will execute at 10:10:40 AM but do not know how to execute 15 second,30 second so on at 10:10 am.

3 Answers   Qwest,


Is unix still around?

1 Answers  


How to calculate the number of words in a file?

1 Answers  


What is difference between SSH V1 and SSH V2? What are drawbacks of SSH V2?

1 Answers   Wipro,


What is the symbol in unix?

1 Answers  


How to perform a system shutdown in unix?

1 Answers  


List a few significant features of unix?

2 Answers  


What is grep|sort give example?

1 Answers  


What is the difference between nfs 3 and nfs 4?

1 Answers  


Who owns unix?

1 Answers  


List some of the frequent shells used in unix along with their indicators?

1 Answers  


Categories