【RHCA+】fortune命令(输出一句话)

" 目录:RHCA+ -> 2 有趣的命令 -> 2 fortune命令(输出一句话) "

显示随机选择的、幽默或诙谐的文本行;语法格式:fortune 参数

|---------------------------|------------------------------------------------------|
| 参数 | 作用 |
| -a | 显示所有数据库中的fortune项 |
| -f | 使用文件作为fortune数据库 |
| -i | 忽略大小写 |
| -l | 显示fortune项的长度 |
| -s | 显示fortune项的简短版本 |
| -m pattern | 仅显示匹配给定模式的fortune项 |
| -n number | 显示指定数量的fortune项 |
| #% file/directory/all | 允许指定一个文件、目录或all来选择fortune项的来源;#和%用于指定数据库中的特定fortune项 |

1、安装

root@Server_8_200 \~# vim /etc/yum.repos.d/epel.repo #创建一个epel仓库

epel

name=epel8

baseurl=http://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/

enabled=1

gpgcheck=0

root@Server_8_200 \~# yum clean all #清理旧缓存

root@Server_8_200 \~# yum makecache #建立缓存

root@Server_8_200 \~# dnf -y install fortune-mod #安装软件

2、使用

root@Server_8_200 \~# fortune #执行命令输出一句话

The 80's -- when you can't tell hairstyles from chemotherapy.

root@Server_8_200 \~# fortune #执行命令输出一句话

Boomer Envy:

Envy of material wealth and long-range material security

accrued by older members of the baby boom generation by virtue of

fortunate births.

-- Douglas Coupland, "Generation X: Tales for an Accelerated

Culture"

root@Server_8_200 \~#

相关推荐
weixin_523185321 小时前
Collections.unmodifiableMap详解:真的不可修改吗?
java·linux·前端
凡人叶枫2 小时前
Effective C++ 条款04:确定对象被使用前已先被初始化
java·linux·开发语言·c++·嵌入式开发
云栖梦泽2 小时前
玩转RK3506SDK
linux·嵌入式硬件
Java面试题总结3 小时前
Linux-Ubantu-贴士-apt的地盘
linux·运维·服务器
kong@react3 小时前
Rocky Linux 10.2 全面解析:企业级 CentOS 替代方案及保姆级docker安装
java·linux·运维·docker
凡人叶枫4 小时前
Effective C++ 条款07:为多态基类声明 virtual 析构函数
linux·c语言·开发语言·c++
凡人叶枫4 小时前
Effective C++ 条款10:令 operator= 返回一个 reference to *this
java·linux·服务器·开发语言·c++·effective c++
|_⊙4 小时前
Linux 中断
linux
Championship.23.245 小时前
Linux 3.0 音频机制深度解析:ALSA基础架构与传统音频驱动模型
linux·运维·音视频·alsa
Tian_Hang5 小时前
Linux基础知识(四)
linux·ide·驱动开发·计算机视觉·硬件工程·动画