Questions tagged [yes]

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

Filter by
Sorted by
Tagged with
18
votes
1answer
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 ...
0
votes
1answer
171 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??
0
votes
1answer
184 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?
5
votes
1answer
9k 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 ...
1
vote
1answer
4k 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).
3
votes
1answer
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-...
61
votes
3answers
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 ...
3
votes
2answers
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 ...
46
votes
5answers
25k 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?