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! |
amule&
or whatever & Don't know the difference. |
|
using the & will send the process to the background and run it.
you can recall it to the foreground with Code:
fg |
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.
|
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 |
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. |
Thanks guys!
|
All times are GMT -5. The time now is 02:28 AM. |