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

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.

主站蜘蛛池模板: 祥云县| 光山县| 惠州市| 三原县| 高雄市| 天水市| 右玉县| 邢台县| 弋阳县| 得荣县| 新巴尔虎右旗| 怀远县| 芮城县| 清涧县| 固安县| 武平县| 东兰县| 鞍山市| 陈巴尔虎旗| 遵义县| 宁晋县| 石楼县| 松溪县| 芜湖市| 东乌珠穆沁旗| 合作市| 酒泉市| 遵化市| 商南县| 高台县| 石泉县| 万山特区| 鄂尔多斯市| 商水县| 大洼县| 漾濞| 永昌县| 宁远县| 乌恰县| 灵武市| 甘洛县|