linux系統命令幫助有man,help等經常使用的工具,可是對於大多數初學者可能看不懂,cheat能夠很好地幫助咱們使用一個命令。python
cheat命令是幹嗎的呢?linux
cheat命令簡單來講,就是告訴你一個命令如何使用。它沒有提供其餘額外多餘的信息,只經過使用實例告訴你一個命令如何使用。
git
好比說,你想要知道解壓命令tar如何使用,都有哪些選項參數等。只須要簡簡單單的輸入
github
[root@localhost2 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/ # 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/ # To use parallel (multi-threaded) implementation of compression algorithms: tar -z ... -> tar -Ipigz ... tar -j ... -> tar -Ipbzip2 ... tar -J ... -> tar -Ipixz ...
怎麼安裝cheat呢;默認linux並無這個安裝包bash
一、安裝python和pip
ide
yum install -y python python-pip
工具
pip install docopt pygmentsspa
二、下載並安裝cheatip
yum install -y gitget
git clone https://github.com/chrisallenlane/cheat.git
cd cheat/
ls
bin CHANGELOG cheat CONTRIBUTING.md LICENSE licenses README.md setup.py
python setup.py install