只是混淆了命令"ls*"的输出.我在Ubuntu 11.10和Redhat Enterprise 6.3中测试了下面的场景,得到了相同的结果.
壳牌日志
$ uname -a Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Sat Nov 24 14:35:28 EST 2012 x86_64 x86_64 x86_64 GNU/Linux $ echo $0 -bash $ cd test $ ls $ ls * *<== at first, no file/directory under current work directory* ls: cannot access *: No such file or directory $ mkdir abc *<== create a new directory "abc"* $ ls * *<== output of "ls *" is empty but directory "abc" has been created.* $ mkdir abcd *<== create the second directory "abcd"* $ ls * *<== at this point, all the directories("abc" and "abcd") are displayed.* abc: abcd:
任何人都可以解释为什么在创建目录"abc"后输出"ls*"为空?谢谢.