Help commands for better use under Linux-cheat

Source: Internet
Author: User
Tags git commands

Guide Linux system, we often use the man command to help see the specific use of this command, man is very powerful, but the English poor classmate with man may not be so handy, naturally appeared the Cheat command, The Cheat command is a simple example that tells you how to use a command, which is created to help system administrators remember common system commands.

1, Cheat introduction

Cheat uses an instance to tell the user how to use some of the commands.

2. Cheat Example

For example, when you want to know how the tar command is used, you can use the following command to view:

Cheat Tar

#你会看到像下面一样的

#查看哪些命令可以用cheat,

Cheat-l | Less


#可以看到常用的命令都可以使用cheat来查看具体使用例子

3, cheat installation

#cheat命令需要python环境的支持, you need to install Python and pip

Yum Install Python-pip–ypip install--upgrade pippip Install cheat

#或者通过github安装

Pip install docopt pygments appdirsgit clone [email protected]:chrisallenlane/cheat.gitcd cheatpython setup.py Install
4, modify the cheat cheat sheet

One of the benefits of cheat is that you can define your own common cheat sheets, and the default is just some of the most basic examples. The customized memo is placed in the ~/.cheat/directory and can be edited using the following command when the editing environment is set up.

CHEAT-E Foo

If the new Foo is already present, it will be opened directly and will not be created and then edited

5. Setting the environment variables used by cheat
[Email protected] [02:20:15]:~ $cheat-vcheat 2.1.25

#设置一个cheat的保存路径
By default, personal cheat are saved under the. Cheat directory under their home directory, but you can define a specific directory environment to make it effective

Export default_cheat_dir= '/opt/cheats '

#可以指定多个目录使其生效

Export cheatpath= "$CHEATPATH:/path/to/more/cheats"

#使用命令cheat-D View defined cheat path

[Email protected] [02:27:27]:~ $cheat-d/opt/cheats #默认cheat保存路径已改变/usr/lib/python2.6/site-packages/cheat/cheatsheets # Cheat default save path for common commands
6. Turn on syntax highlighting

#如果需要在自己备忘录开启语法高亮的话, you can enable it with the following command

Export Cheatcolors=true
7. View Instances 1. DD Command

2. du command

3. Git commands

4. SVN command

#更多实例查看就不一一演示.

8. Custom Cheat
Vim/opt/cheats/iostatcheat Iostat


#修改cheat默认的备忘录, fill in your usual commands

Help commands for better use under Linux-cheat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.