摘要:
下文讲述Linux中yes的功能说明,如下所示;
yes命令功能:
用于在终端上重复输出字符串,
直到在终端上使用“ctrl + c ”命令终止yes命令时,
才会停止运行输出字符串信息
yes命令的语法格式:
yes [字符串]
-----常用参数说明------
-- -help:输出帮助信息
-- -version:输出命令版本信息
例:
yes命令的示例分享
[root@maomao365.com ~]# yes --version
yes (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
[root@maomao365.com ~]# yes --help
Usage: yes [STRING]...
or: yes OPTION
Repeatedly output a line with all specified STRING(s), or `y'.
--help display this help and exit
--version output version information and exit
Report yes bugs to bug-coreutils@gnu.org
GNU coreutils home page:
General help using GNU software:
For complete documentation, run: info coreutils 'yes invocation'
[root@maomao365 ~]# yes maomao365.com
maomao365.com
maomao365.com
maomao365.com
maomao365.com
maomao365.com
...
//当按键盘ctrl+c 才会终止输出