When I activate the yes program, it does not react to the CTRL+Z pause (nor to CTRL+C to stop it).
I know no other ways to run a program in the background than using CTRL+Z and then a bg.
When I activate the yes program, it does not react to the CTRL+Z pause (nor to CTRL+C to stop it).
I know no other ways to run a program in the background than using CTRL+Z and then a bg.
An ampersand at the end of a command will cause the command to be run in the background right from the start:
yes &
yes should respond to CTRL+C and definitely CTRL+Z, though. Maybe it's just taking a while for it to take effect for some reason.
CTRL+Cing while the yes is on, is getting ^C briefly printed, and then y ad infinitum.
yes & only makes the command start with a half-second delay.
Long waiting, and still no sign of yes hiding in the background or ending.
tostop
– JdeBP
May 23 '15 at 19:50
yes & (running yes in the background) won't make it end or not output to the current terminal ad infinitum. That's the expected behavior. What are you trying to achieve?
– Petr Skocik
May 23 '15 at 19:55
yes & is supposed to do. But still yes does not react to my CTRL+C -- now what I want to achieve is to be able to turn off the yes program with that key combination, which for some reason does not work. How can I find out the reasons for those keys not working?
– dziadek1990
May 23 '15 at 20:02
Fedora-Live-Workstation-x86_64-21-5 (on a VBox VM, if it makes a difference), terminal: xterm-256color -------------- [there will be a possible 24+h delay to your request; other priorities for now]
– dziadek1990
May 23 '15 at 20:22