zoukankan      html  css  js  c++  java
  • linux常用命令 history命令

    历史命令

    history [选项] [历史命令保存文件]

    选项
    '-c'
    清空历史命令
    '-w'
    把缓存中的历史命令写入历史命令保存文件~/.bash_history
    
    [root@ssgao1987 ~]# cat .bash_history 
    exit
    yum -y install yum
    yum -y install wget
    …
    

    历史命令的调用

    *) 使用上,下箭头调用以前的历史命令
    *) 使用"!n"重复执行第n条历史命令
    *) 使用"!!" 重复执行上一条命令
    *) 使用"!字串"重复执行最后一条该字串开头的命令
    [root@ssgao1987 ~]# ls
    anaconda-ks.cfg  install.log  install.log.syslog  shell_01.sh  ssgao
    [root@ssgao1987 ~]# !!
    ls
    anaconda-ks.cfg  install.log  install.log.syslog  shell_01.sh  ssgao
    [root@ssgao1987 ~]# !ls
    ls
    anaconda-ks.cfg  install.log  install.log.syslog  shell_01.sh  ssgao
    
  • 相关阅读:
    抽象类使用细节
    super关键字
    JDK,JRE,JVM三者之间的爱恨情仇
    LinkedHashSet
    HashSet扩容成红黑树机制
    Set之HashSet
    finally关键字
    Hashcode方法
    equals方法和==的区别
    LinkedList
  • 原文地址:https://www.cnblogs.com/ssgao/p/8881782.html
Copyright © 2011-2022 走看看