Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the yes command of Linux

Shulou Source: shulou.com Published: 2022-06-01 17:22:22 11月07日 Update

This article mainly introduces the relevant knowledge of "how to use the yes command of Linux". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to use the yes command of Linux" can help you solve the problem.

The function of the Linux common command yes command is to output the specified string in until the yes process is killed. The default string for yes commands that do not take any arguments is y. You can use the key combination ctrl+c to terminate the yes command.

The yes command is usually used in scripts, where you can pipe out confirmation prompts and questions for commands and programs and answer questions (for example: are you sure you want to delete this file, press'y'or'n').

Syntax format: yes [string]

-- help displays help information-- version displays command version information reference example

To reprint a paragraph of characters:

[root@linux265] # yes linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265linux265 If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Commands characters strings knowledge information scripts industries questions help output different practical functional content parameters examples practicality practicality that is commonly used Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Technology MariaDB Shulou Tech Info vpn