Questions tagged [yes]

For the questions about `yes` command which outputs a string repeatedly until killed

Filter by
Sorted by
Tagged with
3 votes
1 answer
741 views

Can you rescue a shell from an accidental "yes" command?

Scenario: I'm running a bunch of commands, some of which prompt for "yes/no" answers. I accidentally type yes as a command instead of as a response to a prompt. OOPS. Now my shell looks ...
user avatar
0 votes
0 answers
26 views

Inquirer program answer questions by piping

Hi I have written this program with inquirer.js it has a list question and after that a text input. I want to answer both questions with piping. If I just keep the list question, I can easily use yes ...
user avatar
18 votes
1 answer
2k views

What happens when writing gigabytes of data to a pipe?

Let's say I have a makefile with a recipe called hour_long_recipe, which as its name suggests takes an hour to run. At random points throughout the recipe it asks yes/no questions. Let's say it asks ...
user avatar
  • 291
0 votes
1 answer
328 views

What happens when piping the `yes` to another command? [duplicate]

If the yes command echos "y" continuously until killed, then it will never get done right? If it will never get done then how does it pipe it's output to the next command??
user avatar
  • 119
1 vote
1 answer
229 views

If /dev/random is implemented as a pseudo-device, why isn't "yes"? [closed]

yes produces a stream of "y" chars, or other requested. If Unixen have a pseudodevice for random numbers, why not useful streams like this too?
user avatar
  • 937
6 votes
1 answer
15k views

How to pipe a 'yes' or 'y' into a program while invoked with 'sudo' in bash?

How to pipe a Y or yes to a program while invoking with sudo? We can type like this yes | command yes | yum update How to pipe the y from yes into a program via sudo like the following? yes| sudo ...
user avatar
  • 2,030
1 vote
1 answer
5k views

How to exit out of a 'yes' loop [closed]

Using the command yes you can make a loop in the Linux terminal.  How do you exit out of said loop?  (I tried Ctrl+C but it didn't work).
user avatar
  • 121
3 votes
1 answer
33k views

yes | apt-get install --fix-broken

I am trying to write a non-interactive system update script. Question: if the following works well: yes | dpkg --configure -a will the following work also very well?: yes | apt-get install --fix-...
user avatar
63 votes
3 answers
9k views

How does `yes` write to file so quickly?

Let me give an example: $ timeout 1 yes "GNU" > file1 $ wc -l file1 11504640 file1 $ for ((sec0=`date +%S`;sec<=$(($sec0+5));sec=`date +%S`)); do echo "GNU" >> file2; done $ wc -l file2 ...
user avatar
  • 21.8k
3 votes
2 answers
2k views

How to use `yes` with `xargs -p`?

Let's say I have ls | xargs -n1 -p rm, how do I use yes or yes n to automatically answer the questions generated by the -p flag? I tried yes n | (ls | xargs -n1 -p rm) but didn't work. UPDATE: The ...
user avatar
  • 139
50 votes
5 answers
26k views

What is the point of the "yes" command?

There is a yes command in unix/linux which basically infinitely prints y to the stdout. What is the point of it, and how is it useful?
user avatar
  • 627