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
    
  • 相关阅读:
    BZOJ 1269 文本编辑器editor(伸展树)
    NOI 2017 整数(线段树)
    HAOI 2018 染色(容斥+NTT)
    HDU 5279 YJC plays Minecraft(NTT+分治)
    HDU 6088 Rikka with Rock-paper-scissors(NTT+欧拉函数)
    HDU 5552 Bus Routes(NTT+分治)
    HDU 4656 Evaluation(MTT)
    HDU 5829 Rikka with Subset(NTT)
    HDU 6061 RXD and functions(NTT)
    JOISC 2014 邮戳拉力赛(DP)
  • 原文地址:https://www.cnblogs.com/kex1n/p/6009837.html
Copyright © 2011-2022 走看看