yes command in Linux with Examples
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. Insted of writting 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 infromation.
Recommended Posts:
- arp command in Linux with examples
- which command in Linux with examples
- cd command in Linux with Examples
- id command in Linux with examples
- cc command in Linux with Examples
- w command in Linux with Examples
- ed command in Linux with examples
- gcc command in Linux with examples
- gs command in Linux with Examples
- for command in Linux with Examples
- man command in Linux with Examples
- top command in Linux with Examples
- rm command in Linux with examples
- fg command in Linux with examples
- bg 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.
Improved By : nidhi_biet



