the linux command line学习笔记之三

linux键盘操作技巧

光标移动:

Ctrl-a    Move cursor to the beginning of the line.
Ctrl-e    Move cursor to the end of the line.
Ctrl-f     Move cursor forward one character; same as the right arrow key.
Ctrl-b    Move cursor backward one character; same as the left arrow key.
Alt-f     Move cursor forward one word.
Alt-b    Move cursor backward one word.
Ctrl-l    Clear the screen and move the cursor to the top left corner. The
            clear command does the same thing.

修改命令行文本:

Ctrl-d    Delete the character at the cursor location
Ctrl-t     Transpose (exchange) the character at the cursor location with the
             one preceding it.
Alt-t      Transpose the word at the cursor location with the one preceding it.
Alt-l      Convert the characters from the cursor location to the end of the
             word to lowercase.
Alt-u     Convert the characters from the cursor location to the end of the
             word to uppercase.

命令行中剪切与复制:

Ctrl-k     Kill text from the cursor location to the end of line.
Ctrl-u     Kill text from the cursor location to the beginning of the line.
Alt-d      Kill text from the cursor location to the end of the current word.
Alt-Backspace
            Kill text from the cursor location to the beginning of the current
            word. If the cursor is at the beginning of a word, kill the previous
            word.
Ctrl-y     Yank(复制) text from the kill-ring and insert it at the cursor location.


命令行history:

!!      重复上一条命令,相当于副键盘的向上键;
!number       执行history中第number条的命令行;
!string           执行history中以string开始的命令行;
!?string         执行上一条history中包含string的命令行;

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。