LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2007, 05:14 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
Question How to run multiple process in single command prompt


hi
Unix exists before the making of GUI interface .since it is a time sharing system ,how can one execute multiple programs in a single command line .



(i.e)the program should not be stopped using CTRL+Z instead it should be running(multiple programs).

thanks
 
Old 10-12-2007, 05:20 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
I'm not sure, but maybe are you talking about background jobs? To put a process in background, simply type a & at the very end of the command line. To see running jobs in background, use the command jobs.
 
Old 10-12-2007, 05:30 AM   #3
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
no i am not saying about background jobs .typing ps -e gives a list of background jobs.

if we run a process in a command terminal by typing processname or ./processname
the process gets started and the command prompt is inactive .


i want 2 know is there any way 2 keep the process running continously and starting
another process in the same command prompt.

thanks for u r reply
 
Old 10-12-2007, 05:42 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by babu198649 View Post
i want 2 know is there any way 2 keep the process running continously and starting another process in the same command prompt.
Yes, it looks like it's just what I was talking about. If you launch something like this
Code:
./processname &
the command prompt is immediately available to type other commands and you can continue your work, while the process runs silently in background. The builtin shell command jobs lists the running jobs.
 
Old 10-12-2007, 06:37 AM   #5
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
yeah u r right
i am sorry i was unable to understand when u replied first.

why does not the job command does not show all the jobs of the system.
it only displays the jobs under its terminal.

is there any command to view all the jobs running in the system

Last edited by babu198649; 10-12-2007 at 06:40 AM. Reason: abstract
 
Old 10-12-2007, 06:52 AM   #6
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 735

Rep: Reputation: 76
Hi.

I agree with colucix.

See http://www.gnu.org/software/bash/man...ref.html#SEC86 for a description of Bash Job Control, which includes the commands for manipulating your processes.

The man page for nohup shows how to start processes that survive a logout. Similarly for command screen (although I find it a bit too complex for my use).

The commands
Code:
ps aux
top
allow viewing of process details ... cheers, makyo
 
Old 10-12-2007, 07:02 AM   #7
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
Thanks again
Cheers...........
 
Old 10-12-2007, 08:27 AM   #8
wit_273
Member
 
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Rep: Reputation: 15
I have found myself from time to time needing to send a running foreground job to the background. You can do that by CTRL Z and then at the prompt type bg (for background). Hope that adds a little more help on this.
 
  


Reply

Tags
background, jobs, process



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
A lot of processes run automatically when I run a single process. dalvirgautam Linux - Enterprise 4 12-01-2006 06:10 PM
kill process in a single command vbseeker Linux - General 4 09-16-2006 10:06 AM
using multiple -exec commands in a single find command? Bluemilk Linux - Newbie 4 03-19-2006 10:46 AM
Compiling multiple .c file using single command in makefile vipulc Linux - General 2 03-18-2006 11:49 PM
typing a program name in the command prompt to run it iammeuno Linux - Newbie 1 12-19-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:12 PM.

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