LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-26-2015, 02:04 AM   #1
fiascoburnett
LQ Newbie
 
Registered: Aug 2015
Distribution: Ubuntu
Posts: 8

Rep: Reputation: Disabled
How do I stop multiple programs that are running in the background?


The are launched from a bash script.
Trying to enter any command on the terminal is not possible because of the scrolling output from these programs.
 
Old 08-26-2015, 02:31 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
It still works, even if you don't see; use the copy+paste feature.
killall(1) might help (if the processess execute the same program)
 
Old 08-26-2015, 07:12 AM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Quote:
Originally Posted by fiascoburnett View Post
The are launched from a bash script.
Trying to enter any command on the terminal is not possible because of the scrolling output from these programs.
Sometimes its easier to log in using a second terminal.
 
1 members found this post helpful.
Old 08-26-2015, 07:53 AM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,487

Rep: Reputation: Disabled
Likely, ps aux - to find their process number - then kill -9 <number>
 
Old 08-26-2015, 04:50 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
inside the scrolling terminal, have you tried Ctrl+C and/or Ctrl+D?
 
Old 08-27-2015, 07:23 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by abefroman View Post
Sometimes its easier to log in using a second terminal.
My thoughts exactly, but considered that maybe they have just the one console.

Therefore some of the other ideas, plus if you know the names of what you started, you can also do: pkill <command-name>

To abefroman's point about a second terminal.

Why are you running a bunch of programs that cause logging to the screen all in the same terminal?

Further note that what you can do instead is the following:
Code:
$ <command> >> logfilename.txt 2>&1
I believe this redirects all stdout and stderr to the log file you specify but then allows you to continue in your terminal where whatever program or process you've run is now in the background.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Running programs in background with Fluxbox ronniejr8 Linux - Newbie 8 04-26-2014 09:30 AM
How to stop a process running in background (on a shell script) Azk00 Linux - Newbie 3 02-01-2008 04:24 AM
Which programs running in background?? bcsman Linux - Newbie 11 05-18-2006 11:40 AM
Programs running in background on linux?? JellyStones Linux - General 4 02-10-2004 05:42 AM
running programs in background koiphish Linux - Software 0 07-07-2003 01:48 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:02 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration