摘要:
下文讲述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 才会终止输出
本文详细介绍了Linux中的yes命令,该命令用于在终端上无限次重复输出指定的字符串,直到用户通过按下Ctrl+C中断。示例中展示了yes命令的基本用法,包括输出版本信息和帮助信息,以及如何输出特定字符串如'maomao365.com'。yes命令是Linux系统中的一个实用工具,常用于自动化脚本中。
7万+

被折叠的 条评论
为什么被折叠?



