Find 命令似乎根本不起作用。例如,我在一个绝对有名为 index.php 的文件的目录中,我执行以下命令:
[root@server htdocs]# find . -name "index.php"
find: .: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我总是得到这个没有这样的文件或目录错误。
无论我定义什么路径,或者我搜索什么文件,我总是得到这个错误。我很确定我忽略了一些非常简单的事情。有人可以指出我做错了什么吗?
[root@server htdocs]# pwd
/srv/www/htdocs
[root@server htdocs]# type -a find
find is /usr/bin/find
[root@server htdocs]# ls -la | grep index.php
-rw-rw-r-- 1 andris users 413 Sep 1 2013 index.php
[root@server htdocs]# find . -name "index.php"
find: .: No such file or directory
[root@server htdocs]# find .
.
find: .: No such file or directory
[root@server htdocs]# stat .
File: `.'
Size: 4096 …
Run Code Online (Sandbox Code Playgroud) find ×1