• 命令别名与历史命令


    20.11.16

    命令别名配置

    alias lm='ls -al | more':配置命令别名

    alias:显示所有的别名

    unalias lm:删除lm 别名


    历史命令

    history [n]
    history [-c]
    history [-raw] histfiles

    选项与参数:
    n :数字,意思是『要列出最近的 n 笔命令行表』的意思!
    -c :将目前的 shell 中的所有 history 内容全部消除
    -a :将目前新增的 history 命令新增入 histfiles 中,若没有加 histfiles ,
    则默认写入 ~/.bash_history
    -r :将 histfiles 的内容读到目前这个 shell 的 history 记忆中;
    -w :将目前的 history 记忆内容写入 histfiles 中!

    !number
    !command
    !!

    选项与参数:
    number :运行第几笔命令的意思;
    command :由最近的命令向前搜寻『命令串开头为 command』的那个命令,并运行;
    !! :就是运行上一个命令(相当于按↑按键后,按 Enter)

  • 相关阅读:
    CLSCompliantAttribute
    杂言
    批处理修改目录的隐藏属性
    unittest基本用法
    unittest跳过用例
    MySQL流程控制结构
    MySQL视图
    MySQL函数
    unittest断言 & 数据驱动
    PLSQL
  • 原文地址:https://www.cnblogs.com/ananing/p/14044133.html
Copyright © 2020-2023  润新知