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

相关推荐
帷幕落秋1 小时前
Linux 网络基础
linux
高晶1 小时前
ARM 嵌入式 Linux 命令系统 BusyBox 实战指南
linux·设计模式·程序员
祥Sir的SRE笔记2 小时前
CPU 100% 不一定是故障:压测打满、业务饱和、突变打满的判断与排查
linux·面试·性能优化·dba·sre·故障定位·性能排查
郝亚军2 小时前
在win11上用openssl生成私钥、再从私钥导出公钥、...
linux·运维·服务器
一个风轻云淡3 小时前
从 int $0x80 到 iret:用 gdb 把 getpid 走一遍
linux·c语言·开发语言·汇编
小超人诞生日记3 小时前
Linux:环境变量 & 进程虚拟地址空间
linux·算法
handonch3 小时前
金仓 KingbaseES 时区问题根治指南:从「总是差 8 小时」到全链路统一
linux·docker·postgresql·信创
Rabitebla3 小时前
【Linux 底层原理】工具篇(一):掌握 Ubuntu apt,让软件安装与管理更简单
linux·笔记·算法·ubuntu
chde2Wang3 小时前
Hadoop集群无datanode进程
linux·运维·服务器
叼烟扛炮3 小时前
Linux 学习笔记(十八):进程控制——优雅地退出与等待
linux·运维·服务器