官术网_书友最值得收藏!

  • Ubuntu 20.04 Essentials
  • Neil Smyth
  • 142字
  • 2021-06-11 17:39:42

9.6 Working with the Shell History

In addition to command-line editing features, the Bash shell also provides command-line history support. A list of previously executed commands may be viewed using the history command:

$ history

    1 ps

    2 ls

    3 ls –l /

    4 ls

    5 man pwd

    6 man apropos

In addition, Ctrl-p (or up arrow) and Ctrl-n (or down arrow) may be used to scroll back and forth through previously entered commands. When the desired command from the history is displayed, press the Enter key to execute it.

Another option is to enter the ‘!’ character followed by the first few characters of the command to be repeated followed by the Enter key.

主站蜘蛛池模板: 昌吉市| 伊春市| 楚雄市| 石林| 准格尔旗| 天津市| 林口县| 航空| 泽州县| 邢台县| 达州市| 蓝山县| 栾川县| 东阳市| 扎鲁特旗| 共和县| 交口县| 镇沅| 莱西市| 西丰县| 沾益县| 永泰县| 玛多县| 潞城市| 江北区| 屯留县| 正阳县| 廊坊市| 仙居县| 綦江县| 腾冲县| 安庆市| 嘉鱼县| 新邵县| 昂仁县| 和林格尔县| 安岳县| 荣昌县| 峨眉山市| 乌苏市| 武强县|