##########虚拟机控制指令#########
本身在windows7虚拟机下,所以指令结果not found
[admin@localhost Desktop]$ rht-vmctl start desktop ##### 开启
bash: rht-vmctl: command not found
[admin@localhost Desktop]$ rht-vmctl view desktop ##### 显示
bash: rht-vmctl: command not found
[admin@localhost Desktop]$ rht-vmctl reset desktop ##### 重置
bash: rht-vmctl: command not found
[admin@localhost Desktop]$ rht-vmctl pweroff desktop ##### 关闭
bash: rht-vmctl: command not found
###########基本操作指令#########
[admin@localhost Desktop]$ date ####显示系统时间,日期
Sat Dec 30 12:37:51 PST 2017
date +%r ####显示时分秒 AM/PM
date -d +58day ####查看58天后的时间
[admin@localhost Desktop]$ cal ####显示系统时间,日历
December 2017
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
passwd ###改变密码
-S student ###用户密码信息
-l student ###锁定帐号
-u student ###解锁
-n 1 student # ##设定密码最短有效期
-x 30 student ###设定密码最长有效期
-w 3 student ###警告期
-i 2 student ###设定用户非活跃天数
-d student ###清除用户密码
[admin@localhost Desktop]$ touch file1 ###touch创建文件
[admin@localhost Desktop]$ mkdir file ###mkdir创建目录
[admin@localhost Desktop]$ mkdir -p a/b/c ###mkdir -p 创建多层目录
[admin@localhost Desktop]$ file file ###file +文件名查看文件类型
rm -f ##强行删除不提示
-r ##删除目录
file: directory
[admin@localhost Desktop]$ history 查看历史操作记录
ctrl +r ####输入字符,会显示最近一天包含该字符的指令
!数字 会操作历史记录中的指令
ls 目标目录名 ######查看目标目录
wc -c 文件名 ######查看文件大小
cp 文件名 目录名 ######把文件复制到目录下面
[root@localhost Desktop]# mv a/file b/c/d/s #####mv 移动文件
[[:alpha:]] ###匹配单个字母
[[:lower:]] ###匹配单个小写字母
[[:upper:]] ###匹配单个大写字母
[[:digit:]] ###匹配单个数字
[[:alnum:]] ###匹配单个数字或字母
[[:punct:]] ###匹配单个符号
[[:space:]] ###匹配单个空格
* ###表示匹配所有
? ###表示匹配单个当前字符
{}表示不存在的或者存在的
{1..9} ###1-9
{a..f} ###a-f
{1,3,5} ###135
{a,c,e} ###a c e
{1..3}{a..c} ###1a 2a 3a 2a 2b 2c 3a 3b 3c
[]表示存在的
[a-C] ###aA bB cC
[a-c] ###aA或者bB或者c
[1-3] ###1或者2或者3
[145] ###1或者4或者5
[^abc]|[!abc] ###除了a并且除了b并且除了c