yes command in Linux with Examples Last Updated : 31 Jul, 2023 Comments Improve Suggest changes Like Article Like Report yes, the command in Linux is used to print a continuous output stream of a given STRING. If STRING is not mentioned then it prints 'y'; Syntax: of `yes` command in Linuxyes [STRING] Note: To stop printing please press Ctrl + C. Use of `yes` commandlet us say that we want to delete all the `.txt` files present in the current directory. Instead of writing `rm -i *.txt` and then typing y at the end for every file, what can be we can use `yes | rm -i *.txt`. Creating Dummy FilesWe can use `yes` command to generate a dummy file quickly by redirecting its output to a file, we can create a file with repetitive content. For Example: If we want to create a file name `jayesh.txt` with 100 lines containing "hello GFG". Syntax: yes "Hello GFG" | head -n 100 > jayesh.txtWe used `cat jayesh.txt` to see the content in the file In this example, "yes" generates an infinite stream of "Hello World" strings, which is then piped to the "head" command to limit the output to 100 lines. Finally, the content is redirected to the "dummy.txt" file. Options: yes --help : It displays help information. yes --version : It displays version information. Comment More infoAdvertise with us D DrRoot_ Follow Improve Article Tags : Technical Scripter Linux-Unix linux-command Linux-text-processing-commands Similar Reads whatis Command in Linux with Examples whatis command in Linux is used to get a one-line manual page description. In Linux, each manual page has some sort of description within it. So, this command search for the manual pages names and show the manual page description of the specified filename or argument. Syntax of the `whatis` command 5 min read How to Display Path of an Executable File in Linux | Which Command In Linux finding the exact path of an excutable file can be crucial for the system adminstration, scripting and as well for troubleshooting. The `which` command helps with providing a simple and effective way to locate the executable files within the directories that are listed in your system. In th 6 min read while Command in Linux with Example The "while" command is a powerful tool in the Linux shell that allows you to execute a series of commands repeatedly based on a given condition. It is commonly used in shell scripts to create loops, where a block of code is executed as long as a particular condition remains true. Basic Syntax of Whi 6 min read How to Display the current Username in Linux | whoami Command Imagine you're working on your computer and forget who you're logged in as. In Linux, there's a special trick called "whoami" that's like asking "Hey computer, who am I right now?" This article explains how this simple command works and helps you remember who's in charge! Don't worry, it won't be fu 4 min read write command in Linux with Examples The `write` command in Linux facilitates the users in sending the messages directly to other logged-in users' terminals. For using this command, try on to type `write username` and then type your message. After typing your message, press `Ctrl+D` to end the session. This command is useful for quick 6 min read xargs command in Linux with examples xargs is a Unix command which can be used to build and execute commands from standard input. Importance:Some commands like grep can accept input as parameters, but some commands accept arguments, this is a place where xargs came into the picture. Syntax of `xargs` command in Linuxxargs [options] [co 5 min read xdg-open command in Linux with Examples xdg-open command in the Linux system is used to open a file or URL in the userâs preferred application. The URL will be opened in the userâs preferred web browser if a URL is provided. The file will be opened in the preferred application for files of that type if a file is provided. xdg-open support 2 min read yes command in Linux with Examples yes, the command in Linux is used to print a continuous output stream of a given STRING. If STRING is not mentioned then it prints 'y'; Syntax: of `yes` command in Linuxyes [STRING] Note: To stop printing please press Ctrl + C. Use of `yes` commandlet us say that we want to delete all the `.txt` fil 2 min read zdiff command in Linux with Examples The zdiff command in Linux is used to invoke the diff program on files compressed via gzip. All options specified are passed directly to diff. By utilizing "zdiff," you can easily analyze differences between compressed files without the need to decompress them beforehand. Important Points:If only on 2 min read zdump command in Linux with Examples The zdump command in Linux is a valuable tool used to display the current time in various time zones. This command outputs the local time for each specified timezone, making it useful for developers, system administrators, or anyone working with multiple time zones. It also helps in analyzing time z 3 min read Like