<s>
yes	O
is	O
a	O
command	B-Application
on	O
Unix	B-Application
and	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
which	O
outputs	O
an	O
affirmative	O
response	O
,	O
or	O
a	O
user-defined	O
string	O
of	O
text	O
,	O
continuously	O
until	O
killed	O
.	O
</s>
<s>
By	O
itself	O
,	O
the	O
yes	O
command	B-Application
outputs	O
'	O
y	O
 '	O
or	O
whatever	O
is	O
specified	O
as	O
an	O
argument	O
,	O
followed	O
by	O
a	O
newline	O
repeatedly	O
until	O
stopped	O
by	O
the	O
user	O
or	O
otherwise	O
killed	O
;	O
when	O
piped	O
into	O
a	O
command	B-Application
,	O
it	O
will	O
continue	O
until	O
the	O
pipe	O
breaks	O
(	O
i.e.	O
,	O
the	O
program	O
completes	O
its	O
execution	O
)	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
user	O
enters	O
a	O
string	O
after	O
'	O
yes	O
,	O
'	O
yes	O
will	O
output	O
the	O
string	O
the	O
same	O
as	O
it	O
would	O
'	O
y	O
,	O
'	O
similar	O
to	O
echo	B-Application
.	O
</s>
<s>
The	O
version	O
of	O
yes	O
bundled	O
in	O
GNU	B-Application
coreutils	I-Application
was	O
written	O
by	O
David	O
MacKenzie	O
.	O
</s>
<s>
The	O
command	B-Application
is	O
available	O
as	O
a	O
separate	O
package	O
for	O
Microsoft	B-Application
Windows	I-Application
as	O
part	O
of	O
the	O
GnuWin32	B-Language
project	O
and	O
the	O
UnxUtils	B-Application
collection	O
of	O
native	B-Language
Win32	B-Library
ports	O
of	O
common	O
GNU	B-Operating_System
Unix-like	B-Operating_System
utilities	O
.	O
</s>
<s>
yes	O
n	O
)	O
response	O
to	O
any	O
command	B-Application
that	O
would	O
otherwise	O
request	O
one	O
,	O
thereby	O
causing	O
the	O
command	B-Application
to	O
run	O
non-interactively	O
.	O
</s>
<s>
Piping	B-Operating_System
yes	O
to	O
a	O
command	B-Application
with	O
many	O
user-confirmation	O
prompts	O
will	O
automatically	O
answer	O
all	O
of	O
those	O
prompts	O
with	O
"	O
yes	O
"	O
(	O
typing	O
'	O
y	O
 '	O
and	O
pressing	O
return	O
)	O
.	O
</s>
<s>
will	O
answer	O
the	O
prompts	O
for	O
confirmation	O
with	O
y	O
,	O
effectively	O
installing	O
foobar	O
with	O
sudo	B-Device
apt	B-Application
without	O
any	O
prompts	O
.	O
</s>
<s>
This	O
usage	O
may	O
be	O
obsolete	O
today	O
,	O
as	O
most	O
commands	O
that	O
would	O
request	O
response	O
from	O
the	O
user	O
have	O
either	O
a	O
'	O
force	O
 '	O
option	O
(	O
e.g.	O
,	O
rm	B-Application
-f	O
)	O
or	O
an	O
'	O
assume-yes	O
'	O
option	O
(	O
for	O
example	O
,	O
apt	B-Application
-y	O
)	O
.	O
</s>
<s>
The	O
yes	O
command	B-Application
in	O
conjunction	O
with	O
the	O
head	B-Device
command	B-Application
can	O
be	O
used	O
to	O
generate	O
large	O
volume	O
files	O
for	O
means	O
of	O
testing	O
.	O
</s>
<s>
In	O
2006	O
,	O
for	O
example	O
,	O
the	O
yes	O
command	B-Application
received	O
publicity	O
for	O
being	O
a	O
means	O
to	O
test	O
whether	O
or	O
not	O
a	O
user	O
's	O
MacBook	B-Device
is	O
affected	O
by	O
the	O
"	O
Intermittent	O
Shutdown	O
Syndrome	O
"	O
bug	O
,	O
where	O
a	O
MacBook	B-Device
would	O
randomly	O
shut	O
off	O
without	O
any	O
user	O
input	O
.	O
</s>
<s>
By	O
running	O
the	O
yes	O
command	B-Application
indefinitely	O
twice	O
via	O
Terminal	B-Application
under	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
,	O
users	O
were	O
able	O
to	O
max	O
out	O
their	O
computer	O
's	O
CPU	O
,	O
and	O
thus	O
see	O
if	O
the	O
failure	O
was	O
heat	O
related	O
.	O
</s>
<s>
The	O
implementation	O
of	O
yes	O
on	O
different	O
Unix	B-Application
and	O
Unix-likes	B-Operating_System
was	O
consistently	O
implemented	O
with	O
a	O
simple	O
while-loop	O
.	O
</s>
<s>
The	O
GNU	B-Operating_System
Project	O
's	O
implementation	O
of	O
yes	O
was	O
much	O
faster	O
than	O
any	O
other	O
implementation	O
,	O
achieved	O
by	O
buffering	O
its	O
output	O
,	O
leading	O
to	O
more	O
output	O
per	O
system	O
call	O
.	O
</s>
<s>
GNU	B-Operating_System
's	O
implementation	O
may	O
have	O
been	O
different	O
to	O
avoid	O
infringing	O
on	O
the	O
Unix	B-Application
copyright	O
.	O
</s>
<s>
The	O
FreeBSD	O
Project	O
changed	O
their	O
implementation	O
in	O
2017	O
to	O
match	O
GNU	B-Operating_System
's	O
implementation	O
.	O
</s>
