别点进来! Linux 与 Mac 下有趣但毫无用处的命令

Linux | Mac 下有趣但毫无用处的命令

引言

今天非常的有意思,在远程 linux的时候疯狂的查看当前列表时,不小心打快了。
将ls 输出成了sl
结果出现了这样的情况:
初始遇见sl

中间过程无法按q 或者 control+C来退出,第一次看见还以为是中病毒了hh。
于是决定查阅和整理一下Mac OS下的安装和展示。

1. sl

sl是Steam Locomotive 蒸汽火车的缩写,因此就会有图中这样的情景出现。

安装

Mac:
brew install sl
Linux:
sudo apt-get install sl

使用

sl

(有一说一我在服务器上遇到这个,是不是学长故意搞得哈哈哈)

2. cmatrix

cmatrix是模拟类似黑客帝国的数字雨场景来进行显示,让人觉得非常的高大上。

安装

Mac:
brew install cmatrix
Linux:
sudo apt-get install cmatrix

使用

➜ ~ cmatrix -h
Usage: cmatrix -[abBfhlsVx] [-u delay] [-C color]
-a: 异步滚动
-b: 上面是黑体字符
-B: 所有字体都是黑体 (覆盖 -b)
-f: 强制使用 linux $TERM 类型
-l: Linux 模式 (使用 matrix 控制台字体)
-o: 使用旧样式滚动
-h: 打印帮助信息
-n: 不用粗体 (覆盖 -b and -B, default)
-s: 屏保模式,任意键退出
-x: X窗口模式,如果你使用xterm的mtx.pcf
-V: 现实版本信息
-u delay (0 - 10, default 4): Screen update delay
-C [color]: 使用自定义颜色 (默认 green 绿色)

效果:

在这里插入图片描述

可以将字体设置为别的颜色,比如蓝色:
在这里插入图片描述

3. ASCIIquarium

把终端变成五颜六色的海洋馆

安装

Mac:
brew install asciiquarium
Linux:
wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz
tar -zxvf asciiquarium.tar.gz
cd asciiquarium_1.1/
cp asciiquarium /usr/local/bin
chmod 0755 /usr/local/bin/asciiquarium

使用

asciiquarium

效果

在这里插入图片描述

4. cowsay

会说话的 ascii 奶牛

安装

Mac:
brew install cowsay
Linux:
sudo apt-get install cowsay

使用

cowsay [想说的话]
cowsay -h
cow{say,think} version 3.03, © 1999 Tony Monroe
Usage: cowsay [-bdgpstwy] [-h] [-e eyes] [-f cowfile]
[-l] [-n] [-T tongue] [-W wrapcolumn] [message]

效果

在这里插入图片描述

5. lolcat

在命令行把输出变成七彩颜色的

安装

Mac:
brew install lolcat
Linux:
wget https://github.com/busyloop/lolcat/archive/master.zip
unzip master.zip
cd lolcat-master/bin
gem install lolcat

使用

command | lolcat

Usage: lolcat [OPTION]… [FILE]…

Concatenate FILE(s), or standard input, to standard output.
With no FILE, or when FILE is -, read standard input.
-p, --spread= Rainbow spread (default: 3.0)
-F, --freq= Rainbow frequency (default: 0.1)
-S, --seed= Rainbow seed, 0 = random (default: 0)
-a, --animate Enable psychedelics
-d, --duration= Animation duration (default: 12)
-s, --speed= Animation speed (default: 20.0)
-i, --invert Invert fg and bg
-t, --truecolor 24-bit (truecolor)
-f, --force Force color even when stdout is not a tty
-v, --version Print version and exit
-h, --help Show this message
Examples:
lolcat f - g Output f’s contents, then stdin, then g’s contents.
lolcat Copy standard input to standard output.
fortune | lolcat Display a rainbow cookie.
Report lolcat bugs to https://github.com/busyloop/lolcat/issues
lolcat home page: https://github.com/busyloop/lolcat/
Report lolcat translation bugs to http://speaklolcat.com/

值得一提的是,这个help的展示也是彩色的

效果

在这里插入图片描述

等等!如果lolcat能够和ls配合,那么能不能和sl配合?
在这里插入图片描述

果然是可以的哈哈哈哈

原创文章 1159 获赞 3664 访问量 1550万+

猜你喜欢

转载自blog.csdn.net/weixin_40400177/article/details/105895226