yes command in linux is used to print a continuous output stream of given STRING. If STRING is not mentioned then it prints ‘y’;
Syntax:
yes [STRING]

Note: To stop printing please press Ctrl + C.
Question: Where it is used ?
Ans: Lets say that we want to delete all the .txt file present in the current directory. Instead of writing rm -i *.txt and then typing y at the end for every file, what we can do is we can use yes | rm -i *.txt.

Options:
- yes –help : It displays help information.
- yes –version : It displays version information.
Recommended Posts:
- 'IPCS' command in Linux with examples
- select command in Linux with examples
- Sed Command in Linux/Unix with examples
- ZIP command in Linux with examples
- SORT command in Linux/Unix with examples
- Cat command in Linux with examples
- Head command in Linux with examples
- Tail command in Linux with examples
- wc command in Linux with examples
- tar command in Linux with examples
- atrm command in Linux with examples
- bc command in Linux with examples
- AWK command in Unix/Linux with examples
- tr command in Unix/Linux with examples
- mv command in Linux with examples
- Paste command in Linux with examples
- comm command in Linux with examples
- cmp Command in Linux with examples
- cut command in Linux with examples
- cp command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

