我尝试使用该命令
sudo find / -type d -iname firefox
它给了我下面的输出
/usr/share/doc/firefox /usr/lib/firefox /home/ashu/.mozilla/firefox /etc/firefox
但我有一个名为Firefox的目录位于
在/ usr / local / sbin中/中
为什么不在这里列出?
很可能是因为/usr/local/sbin/in (或其中一个较早的组件)是另一个目录的符号链接。 find符号链接默认情况下; 使用-follow或-L来改变它,但是要注意它可以导致在目录树上find循环。
它只是命名为firefox ? 版本号是否附有名称? 您在find语句中没有使用通配符,因此将find名为firefox-3的目录。
既然你提到geeokosaur是对的,你可以使用这个表单来包含直接的符号链接:
sudo find / \( -type d -o -xtype d \) -iname firefox
或者作为geekosaur,build议已经使用find -L,因为它也处理(比如说/ usr / local / sbin是一个符号链接)的情况。