RHCE笔记整理-RH033.Unit4-The Bash shell
来源:互联网 发布:通用的顶级域名 编辑:程序博客网 时间:2024/05/20 05:56
RHCE笔记整理-RH033.Unit4-The Bash shell
- Bash :Bourne Again Shell
作用:将用户输入的指令解析成linux kernel能够识别的语言,是用户与系统勾通的桥梁。 - Bash 历史
|--System V:sh--------->Bash
Unix| |
tchsh------------|
zsh
3. File Globbing
- Globbing is wildcard expansion
? matches any single character
[a-z] matches a range of characters
[^a-z] matches all except the range
4. The Tab Key
5. History
Command:history
Usage:
- history命令结果 会输出指令的序号和指令的名称,要使用某一序号的指令,可进行如下操作:!指令序号
- 要修改上一条指令可进行操作:^source^dest
例:#ping 192.168.1.123
#^123^1
则修改后的指令为ping 192.168.1.1
- Back to home directory
$cd ~ - change to other user's home directory
$cd ~username
8. 如何有摊中加入其它指令来显示电脑信息及用指令进行数学运算
- Command output '' or $()
例:$echo "Hostname:`hostname`"
or $echo "Hostname:$(hostname)" - 数学运算:$[]
例:$a=3
$b=5
$c=7
$echo $[$a+$b] //a+b
$echo $[$a**$b] //a的b次方
建议使用时各参数都用空白隔开,这是标准的语法,各平台上都可以使用
- Backslash is the escape character
例:$echo Your cost is $5.00
$Your cost is .00
$echo Your cost is /$5.00
$Your cost is $5.00
- quoting prevents expansion
- Single quotes(`) inhibit all expansion
- Double quotes(") inhibit all expansion except
- $
- /
- `
- !
- use up and down to sroll through previous commands
- type <CTRL-R> to search ro command
- To recall last argument from previous commands:
<esc>. 先按ESC,放开后再按“。”
<Alt-.> 同时按下Alt+.
- By default bsh uses emacs-style
- type "set-o vi" to change keybinding ro vi-style
- set -o 查看电脑上的设定
- 切换编辑模式:
set -o vi 把默认的编辑器改为vi,其中-o表示“减off" 即为“on"
- <ctrl+shift+t> open a new tab
- <ctrl+PgUp/PgDn> Next/Previous tab
- <alt-"N"> change to goto "N" tab
- <ctrl+shift+c/v> copy/paste
- <ctrl+shift+w> close a tab
- RHCE笔记整理-RH033.Unit4-The Bash shell
- RHCE笔记整理-RH033.Unit3--Filesystem
- RHCE笔记整理--RH033.Unit2
- RH033 Unit4 Browsing the Filesystem
- RH033 Unit12 Configuring the Bash Shell
- RH033 Unit6 Using the bash shell
- RHCE之路 RH033 Unit4 (Users And Group)
- RHCE之路 RH033 Unit3 (File and Shell Basics)
- UNIT4笔记
- RH033课后资料[本文摘自RHCE教程]
- RHCE之路 RH033 Unit 2 (总结)
- shell(bash)学习笔记
- Bash Shell笔记
- bash shell学习笔记
- bash shell 学习笔记
- bash shell笔记
- linux bash shell 笔记
- bash shell 临时笔记
- 浮动DIV
- MTD原始设备与FLASH硬件驱动的对话 (二)
- 如何将本地sqlserver2000 数据库转移到虚拟主机上
- mysql中char与varchar的区别
- 启动服务代码
- RHCE笔记整理-RH033.Unit4-The Bash shell
- CSS实现文本渐变效果
- 诺基亚西门子将部分研发业务外包给印度塔塔
- 掌握 Ajax,第 7 部分
- sqlserver清理日志
- zz[SQL基础]Group by和Having
- 掌握 Ajax,第 8 部分
- 微软收购U-Prove科技公司 加强在线隐私策略
- VC读取配置文件(.ini)