Live2D

Bash基本功能--通配符与其他特殊符号

 

 

 

[root@localhost tmp]# ls   //当前目录下有四个文件

0abc   123   abc   abcd

[rootelocalhost tmp]# ls *abc   //匹配abc本身和它前面有一位字符的文件

0abc abc

[rootelocalhost tmp]# ls *abc*  //匹配abc本身和它前后有一位字符的文件

0abc abc abcd

[rootelocalhost tmp]# ls ?abc   //匹配abc前有任意字符的文件

0abc

[rootelocalhost tmp]# ls [0-9]abc   //abc前面有一个数字符号的文件

0abc

[rootelocalhost tmp]# ls [^0-9]abc  //abc前面有一个非数字符号的文件

 

 

 

 

 

posted @ 2020-03-03 17:33  xbycf  阅读(158)  评论(0编辑  收藏  举报