[极客工具]cheat-linux命令行实用助记工具

cheat 小漫画

cheat是一个至关不错的开源项目,关键在于其实用性。python

cheat究竟用来干吗?

如同上述幽默的配图同样,咱们虽然可以使用man和--help来帮助咱们查看命令使用方式,可是不少工程师都以为,他们显然还不够man!git

看看cheat是怎么man的

当我敲下cheat tar的时候,我看到的是不少实用的example,事实上,这种帮助信息更容易记忆,值得一提的是,cheat甚至还会输出一些高级用法!github

cheat 示例

cheat 安装

安装依赖

pip install docopt

git clonebash

git clone https://github.com/chrisallenlane/cheat.git

进入到目录下

python setup.py install

pipspa

pip install cheat

cheat 使用

cheat tar

输出结果code

# 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/

# To list the content of an .gz archive:
tar -ztvf /path/to/foo.tgz

# To extract a .bz2 archive:
tar -xjvf /path/to/foo.tgz

# To create a .bz2 archive:
tar -cjvf /path/to/foo.tgz /path/to/foo/

# To list the content of an .bz2 archive:
tar -jtvf /path/to/foo.tgz

# To create a .gz archive and exclude all jpg,gif,... from the tgz
tar czvf /path/to/foo.tgz --exclude=\*.{jpg,gif,png,wmv,flv,tar.gz,zip} /path/to/foo/

更多cheat command

cheat <cheatsheet>
cheat -e <cheatsheet>
cheat -s <keyword>
cheat -l
cheat -d
cheat -v

cheat 源码

Githubblog

相关文章
相关标签/搜索