簡介不常見的shell組合控制鍵
在應用Linux時,我們經常會遇到shell,shell在Linux操作系統中太普遍了,不過用了很久的Linux,今天才發現有幾個有用的shell組合控制鍵從來都沒有用到過。這里介紹一些不常見的shell組合控制鍵。
^Z 暫停目前的命令
^S 暫停屏幕輸出
^Q 恢復屏幕輸出
^U 將命令列整列刪除
^R 開始漸進收尋過去的命令
^W 從光標倒退刪最后一個參數
bash還默認支持Emacs模式下的組合鍵,如下:
^A 光標跳至行首,也可用
^E 光標跳至行末,也可用
^Y 貼上bash刪除緩沖區里的內容 或
^_ undo
Meta-B 光標倒退跳一個字
Meta-F 光標向前跳一個字
meta-d Kill from the cursor to the end of the current word, or, if between words, to the end of the next word.
Meta-Y Rotate the kill-ring, and yank the new top
bash也支持自定義宏
^x ( 開始紀錄自定義宏
^x ) 結束紀錄自定義宏
^x e 執行自定義宏
希望你學會這些shell組合控制鍵。
【編輯推薦】