yes Command

Purpose

Outputs an affirmative response repetitively.

Syntax

yes [ charstring ]

Description

The yes command outputs an affirmative response repetitively. Use the yes command as piped input to another command that requires an affirmative response before it completes the specified action. For example, the yes command is useful when deleting multiple files from a directory. The Ctl-C key sequence terminates the continuous affirmative responses.

Note: The current locale is determined by the LC_MESSAGES environment variable or the charstring parameter, if specified. The charstring parameter can be any single character or character stream. If you enter an charstring parameter after issuing the yes command, the charstring parameter displays to the screen until you type the Ctl-C key sequence.

Example

To display the word first to the screen, type:

yes first

This statement displays the word until you enter the Ctl-C key sequence.

File

Item Description
/usr/bin/yes Contains the yes command.