使用通配符的rm不起作用。
如果有文件以ef1 &然后,我试着抹去ef1 &ef2 .
$ rm ef*这无法删除ef1 &ef2 .
但是像下面一样,单个文件rm正在工作。$ rm ef1$ rm ef2
尝试用*(星号,通配符)创建要删除的文件
asdf@asdf:~/Documents/rust/hello$ touch ef1 ef2
asdf@asdf: ~/文件/生锈/hello $ ls
ef1 ef2 hello main。test_c
asdf@asdf:~/Documents/rust/hello$ rm ef*
rm: cannot remove 'ef*': No such file or directory
为什么我不能删除ef1和ef2????
asdf@asdf:~/Documents/rust/hello$ rm -r ef*
rm: cannot remove 'ef*': No such file or directory
asdf@asdf:~/Documents/rust/hello$ rm -f f*
asdf@asdf:~/Documents/rust/hello$ rm -rf ef*
asdf@asdf:~/Documents/rust/hello$ sudo rm ef*
rm: cannot remove 'ef*': No such file or directory
asdf@asdf: ~/文件/生锈/hello $ ls
ef1 ef2 hello main。test_c
为什么我不能删除ef1和ef2????
别名rm
bash: alias: rm: not found
rm型
rm被散列(/usr/bin/rm)
rm,
/usr/bin/rm
rm ef*
rm: cannot remove 'ef*': No such file or directory
echo $ -
himBHs
浪费了两天的时间…
我终于自己找到了答案。不幸的是,问题出在我自己身上。我关注的是带有"sudo -i"通配符的rm。所以我检查了。bashrc,用一行找到了解决方案。一旦我注释掉源代码~~~,问题就解决了。
在上述来源~~~~处有波纹线。我不知道我为什么那样做。
# !/bin/sh# GLOBIGNORE ="*">