天天看點

53、shell常用快捷方式

ctrl+l

清屏

ctrl+c

終止指令

ctrl+d

退出shell,好像也可以表示EOF

ctrl+z

将目前程序置于背景,fg還原。

ctrl+r

從指令曆史中找

ctrl+a

光标移到行首

ctrl+e

光标移到行尾

ctrl+w

清除光标之前一個單詞

ctrl+u

清除光标到行首的字元

ctrl+k

清除光标到行尾的字元

ctrl+t

交換光标前兩個字元

ctrl+y

粘貼前一ctrl+u類指令删除的字元

<ESC>+f

光标後移1個單詞

<ESC>+b

光标前移1個單詞

ctrl+s

挂起目前shell

ctrl+q

重新啟用挂起的shell

!!

執行上一條指令

!n:p

列印倒數第n條指令(不執行)

!?string?

最新一條含有"string"的指令

!string

最新一條以"string"開頭的指令

!$

顯示系統最近的一條參數

reset,history,exit,clear

參考

【1】 檢視更多指令

<a href="http://forum.ubuntu.org.cn/viewtopic.php?f=21&amp;t=81951&amp;start=0">http://forum.ubuntu.org.cn/viewtopic.php?f=21&amp;t=81951&amp;start=0</a>

<a href="http://bbs.unixcom.cn/thread-4966-1-1.html">http://bbs.unixcom.cn/thread-4966-1-1.html</a>

【2】 總結的相當不錯

<a href="http://blog.csdn.net/knityster/article/details/6312523">http://blog.csdn.net/knityster/article/details/6312523</a>

<a href="http://www.cnblogs.com/opaque/archive/2011/07/06/2099106.html">http://www.cnblogs.com/opaque/archive/2011/07/06/2099106.html</a>