[極客工具]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

相關文章
相關標籤/搜索