简单介绍一个我用了很久的小工具,cheat 可以被看作一个 Linux 操作系统下的命令行的备(xiǎo)忘录(chāo),今天搜索了以后才知道它还有 go 版本的,因为常用的是 Python 版本,所以还是基于这个版本来介绍。
安装
安装的方法非常简单,使用 pip 安装即可:pip install cheat --user
使用
正常情况下安装完成后会在 $HOME
目录下有一个 .cheat
目录,里面是一些文本文件,此时就可以愉快的“作弊”啦。
举个栗子:
~> cheat tar
# To extract an uncompressed archive:
tar -xvf /path/to/foo.tar
# To create an uncompressed archive:
tar -cvf /path/to/foo.tar /path/to/foo/
# To extract a .gz archive:
tar -xzvf /path/to/foo.tgz
# To create a .gz archive:
tar -czvf /path/to/foo.tgz /path/to/foo/
# More ...
看一下 cheat
命令提供的功能:
~>