LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-08-2003, 01:22 PM   #1
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Rep: Reputation: 30
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?
 
Old 08-08-2003, 01:43 PM   #2
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
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
 
Old 08-09-2003, 05:16 AM   #3
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
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.
 
Old 08-09-2003, 05:22 AM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nohup and Background Jobs Onyx2316 Linux - Newbie 3 02-28-2012 12:10 AM
running jobs on the background feetyouwell Linux - Software 3 08-02-2005 10:36 AM
Background jobs paddyjoy Linux - Newbie 2 07-19-2005 01:46 AM
background jobs seize630 Linux - General 6 10-14-2003 03:16 PM
URGENT: how can you log out without killing jobs cestor Linux - General 2 01-23-2002 01:21 PM


All times are GMT -5. The time now is 03:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration