LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to run multiple process in single command prompt (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-run-multiple-process-in-single-command-prompt-591267/)

babu198649 10-12-2007 05:14 AM

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

colucix 10-12-2007 05:20 AM

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.

babu198649 10-12-2007 05:30 AM

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

colucix 10-12-2007 05:42 AM

Quote:

Originally Posted by babu198649 (Post 2921753)
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.

babu198649 10-12-2007 06:37 AM

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

makyo 10-12-2007 06:52 AM

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

babu198649 10-12-2007 07:02 AM

Thanks again
Cheers...........

wit_273 10-12-2007 08:27 AM

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.


All times are GMT -5. The time now is 09:45 AM.