yes — Print a string until interrupted
It prints the command line arguments, separated by spaces & followed by a newline, forever until it is killed. ‘yes’ can be used to feeds a continuous string of the character to another process and create dummy process for learning the process control.
$ yes — Prints `y’ followed by a newline until killed.
$ yes foobar — Prints foobar followed by a newline until killed.
$ yes `cat myfile` — Print myfile content until killed.
$ yes | fsck /dev/hda1 — Runs fsck non-interactively.
$ yes | rm -r mydir — Same effect as rm -rf mydir.
$ yes > /dev/null & — Dummy process. Redirects ‘y’ to null process and also runs in the background.
Read : man yes
yes, odoc, linux, gnu/linux