Linux基础命令---yes

yes

        反复的输出指定的字符串,直到手动停止。此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。

 

1、语法

        yes [STRING]...

        yes OPTION

        如果不指定字符串,那么输出字符“y”

 

2、选项列表

选项

说明

--help

帮助信息,并且退出

--version

显示命令版本信息,并且退出

 

3、实例

1)输出hello world

[root@localhost ~]# yes hello world

hello world

hello world

hello world

hello world

hello world

hello world^C      //使用ctrl+c强制停止

[weijie@192 root]$ 

2)输出字符y

[root@localhost ~]# yes          //没有任何选项和参数,输出字符y

y

y

y

y

y

^C

You have new mail in /var/spool/mail/root

[root@localhost ~]# 

 

猜你喜欢

转载自blog.csdn.net/wj78080458/article/details/83338281