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

相关推荐
tntxia19 小时前
linux curl命令详解_curl详解
linux
扛枪的书生1 天前
Linux 网络管理器用法速查
linux
顺风尿一寸1 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode1 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫1 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux
AlfredZhao3 天前
生产环境里,为什么不建议把普通端口直接暴露到公网?
linux·https·443·80
戴为沐4 天前
Linux内存扩容指南
linux
zylyehuo5 天前
Linux 彻底且安全地删除文件
linux
用户805533698035 天前
主线 U-Boot 上 RK3506:和闭源 rkbin 拔河的三个隐性契约
linux·嵌入式
用户034095297915 天前
linux fcitx 5 雾凇拼音 设置在中文输入法下仍然输入英文标点
linux