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

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.

主站蜘蛛池模板: 晋宁县| 顺义区| 托克逊县| 奉节县| 津南区| 雷州市| 时尚| 清流县| 西乡县| 监利县| 景洪市| 贺兰县| 抚顺市| 古蔺县| 九江县| 深州市| 仙桃市| 瑞丽市| 两当县| 谢通门县| 弥渡县| 苏州市| 海安县| 会泽县| 呼图壁县| 海口市| 铁岭市| 沁阳市| 京山县| 梁河县| 广汉市| 绥阳县| 织金县| 宜州市| 永平县| 黑水县| 宾阳县| 福州市| 建瓯市| 霍城县| 芦山县|