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

相关推荐
木卫二号Coding13 小时前
推荐Linux统计文件大小并操作删除工具-ncdu
linux·运维·服务器
zhangrelay15 小时前
机械臂末端规划智能模型的误区演示
linux·笔记·学习·ubuntu·ros2
Ivanqhz16 小时前
正余弦位置编码(Sinusoidal Positional Encoding)
java·linux·数据库
H.莓飛17 小时前
【数据结构】队列
linux·数据结构·centos
小此方17 小时前
Linux网络(十九):TCP流量控制与滑动窗口详解,超时重传和快重传到底有什么区别
linux·运维·服务器·网络·网络协议·tcp/ip
码上有光17 小时前
Linux进程通信——共享内存、消息队列和信号量
android·linux·运维·共享内存·通信
沫璃染墨17 小时前
《从零入门Linux系统篇(五十四):线程篇·七——互斥锁底层原理:从原子交换到线程竞争与锁实现》
linux·运维·服务器·开发语言·c++·驱动开发·系统架构
Java后端的Ai之路17 小时前
Python进阶探索24_应用案例_linux系统的监控
linux·开发语言·python·应用·探索
H.莓飛18 小时前
【数据结构】队列_OJ题
linux·数据结构·centos
H.莓飛18 小时前
【数据结构】栈_OJ题
linux·数据结构·算法·centos