Skip to content
Related Articles

Related Articles

Improve Article

yes command in Linux with Examples

  • Last Updated : 08 Nov, 2019

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


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.


  • yes –help : It displays help information.

  • yes –version : It displays version information.

My Personal Notes arrow_drop_up
Recommended Articles
Page :