zoukankan      html  css  js  c++  java
  • Linux 命令

    命令格式

    history [-c] [-d offset] [n]

    history -anrw [filename]

    history -ps arg [arg...]

    命令参数

    -c
      清除历史列表。

    -d offset
      删除编号为 offset 的历史条目。

    n
      显示最近的 n 条记录。

    历史记录扩展

    序列 行为
     !!  重复最后一个执行过的命令。按向上箭头键再按 Enter 键也可以实现相同的功能,而且更符合操作习惯。
     !number   重复历史记录中第 number 行的命令。
     !string  重复最近的以 string 开头的命令。
     !?string  重复最近的包含 string 的命令。

    实例

    a) 显示最近执行的 5 条命令。

    [huey@huey-K42JE ~]$ history 5
      848  pwd
      849  curl ifconfig.sh
      850  last
      851  clear
      852  history 5

    b) 删除编号为 850 的历史条目。

    [huey@huey-K42JE ~]$ history -d 850

    c) 清空历史列表。

    [huey@huey-K42JE ~]$ history -c

    d) 执行上一个以 curl 开头的命令。

    [huey@huey-K42JE ~]$ !curl
    curl ifconfig.sh
    104.238.141.75
  • 相关阅读:
    原生态 php连接mysql
    sql查询慢 查找
    死锁查询和处理
    linq详细案例
    linq深入
    DataTable 与XML 交互
    DataTable运用
    通过反射修改已有数组的大小
    通过反射取得并修改数组信息
    通过反射机制直接操作属性
  • 原文地址:https://www.cnblogs.com/huey/p/4853372.html
Copyright © 2011-2022 走看看