页次: 1
[root@ippbs ~]# rm * -f [root@ippbs ~]# touch a1.txt a2.txt a3.txt [root@ippbs ~]# touch b1.txt b2.txt b3.txt [root@ippbs ~]# [root@ippbs ~]# GLOBIGNORE='a*' [root@ippbs ~]# ls a* ls: cannot access a*: No such file or directory [root@ippbs ~]# GLOBIGNORE='a*:b*' [root@ippbs ~]# ls a1.txt a2.txt a3.txt b1.txt b2.txt b3.txt [root@ippbs ~]# ls * ls: cannot access *: No such file or directory
这首先清空目录后,创建六个文件。
GLOBIGNORE="a*" 作用是当执行 ls a* , 的是, 这里命令中有 * 。 才有效果
如果没有 * GLOBIGNORE 没有效果。
需要注意的地方是使用多个,他们之间用冒号分开。
ipbbs.net
离线
页次: 1