命令 history

上一篇 / 下一篇  2015-04-17 15:39:46 / 个人分类:Linux

history 还用history可以查看我们曾经执行过的命令,如果觉得history输入起来太麻烦,记得使用别名哦。
alias h='history'
  • history [n]
  • history [-c]
  • history [-row] histfiles
  • 利用history功能帮助执行命令
  • !number
  • !command
  • !!
  • eg:   [root&Hogan 04:34:48 /home #54]# history 5
      231  history  -w
      232  echo $HISTSIZE
      233  dir
      234  history 10
      235  history 5
    [root&Hogan 04:34:57 /home #55]# !232
    echo $HISTSIZE
    1000
    [root&Hogan 04:35:12 /home #56]# !!
    echo $HISTSIZE
    1000
    [root&Hogan 04:35:18 /home #57]# !his    //执行最近以his开头的命令
    history 5
      233  dir
      234  history 10
      235  history 5
      236  echo $HISTSIZE
      237  history 5

TAG: history

 

评分:0

我来说两句

日历

« 2024-04-25  
 123456
78910111213
14151617181920
21222324252627
282930    

我的存档

数据统计

  • 访问量: 2684
  • 日志数: 6
  • 建立时间: 2015-04-15
  • 更新时间: 2015-04-22

RSS订阅

Open Toolbar