zoukankan      html  css  js  c++  java
  • cheat-linux命令行实用助记工具

    cheat究竟用来干嘛?

    我们虽然能够使用man和--help来帮助我们查看命令使用方式,但是很多工程师都觉得,他们显然还不够man!

    看看cheat是怎么man的

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

    cheat 安装

    安装依赖

    (如果没有安装git和pip的话,可能需要先安装git或者pip。 apt-get install git)

    pip install docopt
    
    git clone https://github.com/chrisallenlane/cheat.git
    

    进入到目录下

    python setup.py install
    
    pip install cheat  (这个可以省略?)
    

    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/
    

    更多cheat command

    cheat <cheatsheet>
    cheat -e <cheatsheet>
    cheat -s <keyword>
    cheat -l
    cheat -d
    cheat -v
    
  • 相关阅读:
    MapReduce编程
    Xcode7 真机调试
    【学习笔记】【OC语言】NSString
    【学习笔记】【OC语言】多态
    【学习笔记】【OC语言】继承
    【学习笔记】【OC语言】self关键字
    【学习笔记】【OC语言】类方法
    【学习笔记】【OC语言】set方法和get方法
    【学习笔记】【OC语言】创建对象
    【学习笔记】【OC语言】面向对象思想
  • 原文地址:https://www.cnblogs.com/kex1n/p/6009837.html
Copyright © 2011-2022 走看看