Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made an .sh file which has (almost) unlimited loop of curl requests. I run this as $ bash Now it just keeps running the loop. I can't cancel its execution. It keeps running. I pressed ctrl+c to cancel but it starts again. I closed the terminal window. But in background script is still running. how do I get rid of it?

share|improve this question

closed as off-topic by dawud, Sven, Iain, Michael Hampton Mar 20 '14 at 22:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – dawud, Sven, Iain, Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

get the pid and kill the process. Its a beginner question

ps -ef | grep [l]  # second column is the PID

kill <PID>
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.