LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   killing background jobs? (https://www.linuxquestions.org/questions/linux-general-1/killing-background-jobs-80196/)

sk8guitar 08-08-2003 01:22 PM

killing background jobs?
 
hey, just for future reference i was curoius to know if you set a background job like

grip &

and then it starts misbehaving, how do you go about killing it in CLI?

kev82 08-08-2003 01:43 PM

1) find its pid with ps, then issue a kill
2) bring it into the forground then kill it
3) run top, and kill it
4) the other 50,000 ways that i cant be bothered to type

lfur 08-09-2003 05:16 AM

sk8guitar,

every job that you run in backgound has a specific number: from 1 on. So if you run:
gimp &
mozilla &
mc &

and then use:
jobs

you will see, that gimp is %1, mc is %3 ... so, it's kill %1 and there goes gimp.

Crashed_Again 08-09-2003 05:22 AM

Or if you want to see what the program is complaining about you can bring it to the foreground again:

fg %1

then you can simply Ctrl+C to break out of it.


All times are GMT -5. The time now is 07:48 PM.