[Shell]Linux命令行初阶(一)
来源:互联网 发布:cisco mac acl 无效 编辑:程序博客网 时间:2024/06/05 01:17
终端里写了一堆命令,发现前面有些单词错了,是全删了后面无辜的单词去改它吗?如果是这样就太dull了。这里介绍在终端里移动光标的方法,用的是Readline库的快捷键。
像bash、bc、gnuplot这样从行读入命令的软件都用了GNU Readline这个库,而它是有很多快捷键的,把它们都贴过来,用时看看吧~~
源地址:http://www.bigsmoke.us/readline/shortcuts
Emacs keys
Action
Scope
Direction/Place
Moving around
Ctrl-b
Move the cursor
one character
⇦ to the left
Ctrl-f
Move the cursor
one character
⇨ to the right
Alt-b
Move the cursor
one word
⇦ to the left
Alt-f
Move the cursor
one word
⇨ to the right
Ctrl-a
Move the cursor
⇤ to the start of the line
Ctrl-e
Move the cursor
⇥ to the end of the line
Ctrl-x-x
Move the cursor
⇤⇥ to the start, and to the end again
Cut, copy
and paste
Backspace
Delete
the character
⇦ to the left of the cursor
DEL
Ctrl-d
Delete
the character
underneath the cursor
Ctrl-u
Delete
everything
⇤ from the cursor back to the line start
Ctrl-k
Delete
everything
⇥ from the cursor to the end of the line
Alt-d
Delete
word
⇨ untill before the next word boundary
Ctrl-w
Delete
word
⇦ untill after the previous word boundary
Ctrl-y
Yank/Paste
prev. killed text
at the cursor position
Alt-y
Yank/Paste
prev. prev. killed text
at the cursor position
History
Ctrl-p
Move in history
one line
⇧ before this line
Ctrl-n
Move in history
one line
⇩ after this line
Alt->
Move in history
all the lines
⇩ to the line currently being entered
Ctrl-r
Incrementally search the line history
⇧ backwardly
Ctrl-s
Incrementally search the line history
⇩ forwardly
Ctrl-J
End an incremental search
Ctrl-G
Abort an incremental search and restore the original line
Alt-Ctrl-y
Yank/Paste
arg. 1 of prev. cmnd
at the cursor position
Alt-.
Alt-_
Yank/Paste
last arg of prev. cmnd
at the cursor position
Undo
Ctrl-_
Ctrl-x
Ctrl-u
Undo the last editing command; you can undo all the way back to an empty line
Alt-r
Undo all changes made to this line
Ctrl-l
Clear the screen, reprinting the current line at the top
Ctrl-l
Clear the screen, reprinting the current line at the top
Completion
TAB
Auto-complete a name
Alt-/
Auto-complete a name (without smart completion)
Alt-?
List the possible completions of the preceeding text
Alt-*
Insert all possible completions of the preceeding text
Transpose
Ctrl-t
Transpose/drag
char. before the cursor
↷ over the character at the cursor
Alt-t
Transpose/drag
word before the cursor
↷ over the word at/after the cursor
- [Shell]Linux命令行初阶(一)
- LInux命令行与shell学习(一)
- [Shell]Linux命令行初阶(零)
- linux shell 系列 (一)linux命令行攻略
- linux命令行(一)
- linux 命令行 (一)
- 简单shell命令行解释器 (一)
- 熟悉Unix/Linux Shell和常见的命令行(一)文件系统结构和基本操作
- Step one : 熟悉Unix/Linux Shell 常见命令行 (一)
- linux命令行+SHELL编程学习(1)
- linux命令行+SHELL编程学习(2)
- Linux命令行+SHELL编程学习(3)
- 笔记:Linux Shell (四): 命令行约定
- Linux --shell(一)
- linux shell(一)
- linux shell(一)
- Linux Shell命令行
- Linux 命令行Shell快捷键
- 《windows程序设计》第五版学习笔记(1)
- Xen bridge network and Xen Networking
- Matlab中的保存数据语句比较
- baseData.js
- 点对点视频会议程序:VideoNet
- [Shell]Linux命令行初阶(一)
- bsTable.js
- MeeGo 1.1成功在Nexus One上运行!
- 使用动态编译方式 取代较固定的缓存 来加速系统响应
- 关注Andriod之环境搭建
- 软件工程一瞥——方晓
- 收藏了一些漂亮表单的连接
- 示波器(oscilloscope )学习(1)-简介
- 关于提交代码频率的思考