freeing the prompt

Ian Malone ibmalone at gmail.com
Fri Feb 17 18:28:51 UTC 2006


azeem ahmad wrote:
> i have a program that captures the terminal, mean when i run it it shows 
> some outputs on that terminal, i want it to run it in background, i 
> remember there is some thing to do with redirecting its output to 
> /dev/null, but it simply hides the output, it doesnt free the prompt
> can u guys tell me about the command
> Regards
> Azeem
> 
> 

$ cat < /dev/zero > /dev/null&

<or...>

$ cat < /dev/zero > /dev/null

<realise you wanted it background: press Ctrl-Z>

[1]+  Stopped                 cat </dev/zero >/dev/null

<it will be paused, start it running in the background>
$ bg %1
       ^ the number in square brackets above

<decide you didn't want to do it anyway>
$ kill %1

<or>
$ ps
   PID TTY          TIME CMD
  5818 pts/1    00:00:00 bash
  5847 pts/1    00:00:00 cat
  5848 pts/1    00:00:00 ps

$ kill 5847

If you want to do more, check out the screen package (you may have to
"yum install" it).

-- 
imalone




More information about the fedora-list mailing list