Linux_BASH中组合按键、通配符、特殊符号
2016-11-08 12:30
316 查看
组合按键
这些是Linux发行版自己设置的组合键,已被大多用户所接受,当然,你可以定制自己的终端组合按键:stty
-a选项是显示stty的所有参数
belove@belove-ThinkPad-T440p:~$
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
看到intr项,这个项的意思是“发送一个interrupt信号给当前正在运行的程序”,“^”表示Ctrl键是不是和上面的‘Ctrl + C’一样。你可以自己DIY自己的组合按键,eg:stty intr ^I. 这样‘Ctrl + I’就是停止当前运行程序了。
通配符
特殊符号
组合按键 | 执行结果 |
---|---|
Ctrl + C | 终止当前命令 |
Ctrl + Z | 暂停当前命令 |
Ctrl + D | EOF,输入结束 |
Ctrl + M | Enter |
Ctrl + U | 删除目前命令输入的所有文字 |
Ctrl + S | 暂停屏幕输出 |
Ctrl + Q | 回复屏幕输出 |
这些是Linux发行版自己设置的组合键,已被大多用户所接受,当然,你可以定制自己的终端组合按键:stty
-a选项是显示stty的所有参数
belove@belove-ThinkPad-T440p:~$
stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
看到intr项,这个项的意思是“发送一个interrupt信号给当前正在运行的程序”,“^”表示Ctrl键是不是和上面的‘Ctrl + C’一样。你可以自己DIY自己的组合按键,eg:stty intr ^I. 这样‘Ctrl + I’就是停止当前运行程序了。
通配符
通配符 | 意义 |
---|---|
* | 代表0到无穷个字符 |
? | 代表一个字符 |
[] | 代表集合中的任意一个字符 |
[-] | 代表集合范围中的任意一个字符 |
[^] | 取反,除了集合中的任意一个字符 |
特殊符号
符号 | 内容 |
---|---|
# | 注释 |
\ | 转义符号 |
| | 管道(pipe),分隔两个管道的界定 |
; | 连续命令执行分隔符 |
~ | 用户主目录,‘cd -’回到上个工作目录 |
- | 管道命令中表示标准输出 |
$ | 使用变量前导符 |
& | 作业控制,将命令变成背景下工作 |
>, >> | 数据流重定向,输出导向,>:替换 >>:累加 |
<, << | 输入导向,<<:结束输入的标志 |
’ ‘ | 单引号,不具有变量置换功能 |
” “ | 双引号,具有变量置换功能 |
` ` | 中间为可以先执行的命令,功能相当于括号,也可是使用$() |
相关文章推荐
- Linux的通配符(wildcard)和bash下的特殊符号
- [linux_shell]Bash通配符与特殊符号
- Linux通配符和特殊符号
- BASH中用到的通配符和特殊符号
- linux 命令系列之 Linux常见的通配符和特殊符号(45)
- linux下的通配符与特殊符号
- Linux中通配符和常用特殊符号
- linux下的通配符和特殊符号用法详解
- Linux学习笔记--命令的顺序执行、管道符、通配符、其他特殊符号
- Linux学习日记 —— 10.3.5 Shell基础-Bash基本功能-通配符和其他特殊符号
- linux 管道符号 | ,以及&& ||等等特殊符号、通配符
- 11、linux下的通配符和特殊符号
- [Shell]Bash基本功能:通配符与特殊符号
- bash通配符与特殊符号
- linux文件属性、特殊符号、通配符、通配符与正则的区别
- bash的通配符与特殊符号
- Shell基础-Bash基本功能-通配符和其他特殊符号
- centos 正则,grep,egrep,流式编辑器 sed,awk -F 多个分隔符 通配符 特殊符号. * + ? 总结 问加星 cat -n nl 输出文件内容并加上行号 alias放~/.bash_profile 2015-4-10 第十三节课
- Linux下的通配符和特殊符号
- bash环境中的通配符和特殊符号的简单介绍