【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 \~#

相关推荐
琥珀色糖4 小时前
Linux守护进程
linux·终端·守护进程·会话·进程组
开心大爆炸8 小时前
xrdp 连接 登录对话框输入密码后闪退
linux·运维·服务器
oushaojun28 小时前
大厂 C++ 面试:深度剖析 Linux Signal 信号机制(转)
linux
苏生Susheng9 小时前
【软件实施】Linux系统Shell脚本教程
linux·运维·服务器·chrome·spring boot·学习·实施
Ruiery9 小时前
Linux 6.6内核 IOMMU 深度解析(七):DMA API 与 IOMMU 集成 — 从 dma_map_single 到 iommu_map
linux·运维·服务器
分支预测失败9 小时前
RISC-V AIA 中断架构实战:从 PLIC 到 APLIC 与 IMSIC 的迁移
linux·后端
GeW9 小时前
RHCE学习拿证计划:锁定核心考点,实现备考效率最大化
linux
snow@li9 小时前
服务器运维:Alibaba Cloud Linux 4 LTS 64位 根目录全景深度解析文章
linux·运维·服务器
苏生Susheng10 小时前
【软件实施】Linux企业运维常用命令手册
java·linux·运维·服务器·springboot·springcloud·软件实施
额额额对了10 小时前
Linux 进程间通信(IPC)核心机制:消息队列、共享内存与信号量详解
linux·网络·网络协议