通配符及其他!

常用通配符
【*】 代表0个或多个字符
【?】代表一个字母
[root@monitor ~]# ls
test
[root@monitor ~]# ls |grep te??
test
【~】表示当前用户的家目录
【&】将命令变成后台工作
【()】括号内为子shell的起始与结束
【[]】中间为字符组合
e.g
ls *[a-z]*或ls *[A-Z]*
命令是列出含小写字母或大写字母的文件或文件夹
ls *[!0-5]*
列出不含数字0到5的文件或文件夹

【{}】中间为命令区块的组合

补充:(`)可以用$()来代替
[root@Xiaoqiao ~]# echo "there are (`ls |wc -l`) files in this folder"
 
there are (26) files in this folder

[root@Xiaoqiao ~]# echo "there are `ls |wc -l` files in this folder" 
there are 26 files in this folder

[root@Xiaoqiao ~]# echo "there are $(ls |wc -l) files in this folder"          
there are 26 files in this folder



ctrl+m 回车
ctrl+s 暂停屏幕输出
ctrl+q 恢复屏幕输出


 

你可能感兴趣的:(职场,通配符,休闲)