I have started running a long job by creating a script that executes several commands on 20 or so datasets sequentially. I began in the xterm window with

$ script.scr

then typed


then called

$ bg

and then exited the window. I have now returned and started another xterm window and decided to kill the job, but when I identify the PID with top and then

$ kill PID

the current process PID is killed but the job then starts the next command line of the script.

I could manually then kill again the new PID created but since there are 20 or more similar command lines in the script this becomes tedious. Is there a short (efficient) way of killing the whole job?

$ killall PID just kills the current process then a new one starts just the

same as using kill.

$ killall script.scr does not have any effect

  • Does killing the job lead to the same results? kill %jobnumber – YoMismo Apr 15 '15 at 9:03
  • Can you post the scrip.scr script here...if possible ? – SHW Apr 16 '15 at 6:28

Execute the command killall script.scr

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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