Questions tagged [yes]

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

Filter by
Sorted by
Tagged with
40
votes
5answers
22k 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?
58
votes
3answers
8k 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 ...