Skip to content
Related Articles
Open in App
Not now

Related Articles

yes command in Linux with Examples

Improve Article
Save Article
  • Last Updated : 08 Nov, 2019
Improve Article
Save Article

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.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!