LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   simple terminal question (https://www.linuxquestions.org/questions/linux-newbie-8/simple-terminal-question-446399/)

itz2000 05-19-2006 08:16 AM

simple terminal question
 
Hello,

I've been wondering how to do this :

if I open for example, amule via terminal, it writes it output on terminal, etc...
but I cannot continue working in the same terminal without closing the amule via CTRL+C.

so how can I do a command something like kaffeine *.avi (or amule) and continue working in the same terminal without viewing the errors/whatever... is there a silent mode for every executeable program?

also, how can I use the screen command, I've done man screen, but I need some examples, and why it's usful.

thanks!

Linux.tar.gz 05-19-2006 08:19 AM

amule&
or
whatever &

Don't know the difference.

michapma 05-19-2006 08:32 AM

http://www.google.ch/linux?num=20&hl...G=Search&meta=

ethics 05-19-2006 09:23 AM

using the & will send the process to the background and run it.

you can recall it to the foreground with
Code:

fg

FirebirdV0273 05-19-2006 09:29 AM

Also, you can use Ctrl-z while a program is running on the terminal to background it. This will present you with your prompt again and the program is still running. You can foreground it again (bring the output of the program back to the screen) with the fg command.

drkstr 05-19-2006 09:45 AM

using screen is another solution. run 'screen' before running the program which puts the output in a newly created virtual terminal. You can detach with 'ctrl+a' + 'ctlr+d' and reattach with 'screen -r'. This has some other benefits then just placing something in the background. 'man screen' for more info.

regards,
...drkstr

puffinman 05-19-2006 09:47 AM

Ctl-Z does not move the program to the background, it suspends it, meaning it stops running. You can have it run in the background with the bg command (and you'll need to specify a job number if there are multiple suspended programs).

Also note that using & will not really free up your terminal if the program in the background still writes to stdout (try running something like ls & and see what happens). The stdout/stderr will need to be redirected to /dev/null or a file if you want your terminal session undisturbed.

As for screen, try googling "GNU screen" to get some opinions and tutorials. I myself find it extremely useful, especially when remotely accessing my desktop at home.

itz2000 05-19-2006 12:37 PM

Thanks guys!


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