The Wayback Machine - https://web.archive.org/web/20230512160216/https://www.geeksforgeeks.org/yes-command-in-linux-with-examples/
Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

yes command in Linux with Examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like 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
Last Updated : 08 Nov, 2019
Like Article
Save Article
Similar Reads